Replace CR_UNUSED with G_GNUC_UNUSED
authorTomas Mlcoch <tmlcoch@redhat.com>
Tue, 5 May 2015 13:14:51 +0000 (15:14 +0200)
committerTomas Mlcoch <tmlcoch@redhat.com>
Tue, 5 May 2015 14:24:36 +0000 (16:24 +0200)
40 files changed:
src/createrepo_c.c
src/createrepo_shared.c
src/dumper_thread.c
src/load_metadata.c
src/misc.c
src/misc.h
src/parsehdr.c
src/python/checksum-py.c
src/python/compression_wrapper-py.c
src/python/contentstat-py.c
src/python/load_metadata-py.c
src/python/locate_metadata-py.c
src/python/misc-py.c
src/python/package-py.c
src/python/parsepkg-py.c
src/python/repomd-py.c
src/python/repomdrecord-py.c
src/python/sqlite-py.c
src/python/updatecollection-py.c
src/python/updatecollectionpackage-py.c
src/python/updateinfo-py.c
src/python/updaterecord-py.c
src/python/updatereference-py.c
src/python/xml_dump-py.c
src/python/xml_file-py.c
src/python/xml_parser-py.c
src/sqlite.c
src/threads.c
src/xml_parser.c
src/xml_parser_filelists.c
src/xml_parser_other.c
src/xml_parser_primary.c
src/xml_parser_repomd.c
src/xml_parser_updateinfo.c
tests/test_compression_wrapper.c
tests/test_misc.c
tests/test_sqlite.c
tests/test_xml_file.c
tests/test_xml_parser_filelists.c
tests/test_xml_parser_repomd.c

index 7d3955cfd0150bdedbc53fe3cad716c7de3ac71e..e1adb4b2fbc619d9e2cfcfb00377215bcdfa9229 100644 (file)
@@ -90,12 +90,11 @@ allowed_file(const gchar *filename, GSList *exclude_masks)
  * @param user_data     Unused (user data)
  */
 static int
-task_cmp(gconstpointer a_p, gconstpointer b_p, gpointer user_data)
+task_cmp(gconstpointer a_p, gconstpointer b_p, G_GNUC_UNUSED gpointer user_data)
 {
     int ret;
     const struct PoolTask *a = a_p;
     const struct PoolTask *b = b_p;
-    CR_UNUSED(user_data);
     ret = g_strcmp0(a->filename, b->filename);
     if (ret) return ret;
     return g_strcmp0(a->path, b->path);
index 2d4754914e967a605ad83ec9b616e68706f36e11..63392d7840eeb14040842b9bc9f30166fe3aece3 100644 (file)
@@ -44,9 +44,8 @@ char *global_tmp_out_repo = NULL;  // Path to temporary repodata directory,
  * @param data              User data (unused)
  */
 static void
-failure_exit_cleanup(int exit_status, void *data)
+failure_exit_cleanup(int exit_status, G_GNUC_UNUSED void *data)
 {
-    CR_UNUSED(data);
     if (exit_status != EXIT_SUCCESS) {
         if (global_lock_dir) {
             g_debug("Removing %s", global_lock_dir);
@@ -73,10 +72,8 @@ sigint_catcher(int sig)
 gboolean
 cr_set_cleanup_handler(const char *lock_dir,
                        const char *tmp_out_repo,
-                       GError **err)
+                       G_GNUC_UNUSED GError **err)
 {
-    CR_UNUSED(err);
-
     assert(!err || *err == NULL);
 
     // Set global variables
@@ -115,10 +112,8 @@ cr_set_cleanup_handler(const char *lock_dir,
 }
 
 gboolean
-cr_unset_cleanup_handler(GError **err)
+cr_unset_cleanup_handler(G_GNUC_UNUSED GError **err)
 {
-    CR_UNUSED(err);
-
     g_free(global_lock_dir);
     global_lock_dir = NULL;
     g_free(global_tmp_out_repo);
index 0bc3eb5dab0d5acb77f9c447faf956d418ed1106..6e73d979a331ddb23edfdad6495a17ca13afa73b 100644 (file)
@@ -50,9 +50,8 @@ struct BufferedTask {
 
 
 static gint
-buf_task_sort_func(gconstpointer a, gconstpointer b, gpointer data)
+buf_task_sort_func(gconstpointer a, gconstpointer b, G_GNUC_UNUSED gpointer data)
 {
-    CR_UNUSED(data);
     const struct BufferedTask *task_a = a;
     const struct BufferedTask *task_b = b;
     if (task_a->id < task_b->id)  return -1;
index 59878f3839bf36eea1cc255b42c689e86742fc9f..56cb233e67063e2905292de8f570e70e43c17370 100644 (file)
@@ -164,19 +164,14 @@ typedef struct {
 
 static int
 primary_newpkgcb(cr_Package **pkg,
-         const char *pkgId,
-         const char *name,
-         const char *arch,
-         void *cbdata,
-         GError **err)
+                 G_GNUC_UNUSED const char *pkgId,
+                 G_GNUC_UNUSED const char *name,
+                 G_GNUC_UNUSED const char *arch,
+                 void *cbdata,
+                 G_GNUC_UNUSED GError **err)
 {
     cr_CbData *cb_data = cbdata;
 
-    CR_UNUSED(pkgId);
-    CR_UNUSED(name);
-    CR_UNUSED(arch);
-    CR_UNUSED(err);
-
     assert(*pkg == NULL);
 
     if (cb_data->chunk) {
@@ -190,15 +185,13 @@ primary_newpkgcb(cr_Package **pkg,
 }
 
 static int
-primary_pkgcb(cr_Package *pkg, void *cbdata, GError **err)
+primary_pkgcb(cr_Package *pkg, void *cbdata, G_GNUC_UNUSED GError **err)
 {
     gboolean store_pkg = TRUE;
     cr_CbData *cb_data = cbdata;
     cr_Package *epkg;
     char *basename = cr_get_filename(pkg->location_href);
 
-    CR_UNUSED(err);
-
     assert(pkg);
     assert(pkg->pkgId);
 
@@ -276,17 +269,13 @@ primary_pkgcb(cr_Package *pkg, void *cbdata, GError **err)
 static int
 newpkgcb(cr_Package **pkg,
          const char *pkgId,
-         const char *name,
-         const char *arch,
+         G_GNUC_UNUSED const char *name,
+         G_GNUC_UNUSED const char *arch,
          void *cbdata,
-         GError **err)
+         G_GNUC_UNUSED GError **err)
 {
     cr_CbData *cb_data = cbdata;
 
-    CR_UNUSED(name);
-    CR_UNUSED(arch);
-    CR_UNUSED(err);
-
     assert(*pkg == NULL);
     assert(pkgId);
 
@@ -327,12 +316,10 @@ newpkgcb(cr_Package **pkg,
 }
 
 static int
-pkgcb(cr_Package *pkg, void *cbdata, GError **err)
+pkgcb(cr_Package *pkg, void *cbdata, G_GNUC_UNUSED GError **err)
 {
     cr_CbData *cb_data = cbdata;
 
-    CR_UNUSED(err);
-
     if (cb_data->chunk) {
         assert(pkg->chunk == cb_data->chunk);
         pkg->chunk = NULL;
index a8974b1a94d2916c13bf791f12561b3325fd2f99..b101f7fbfc8864bd4ca0301127a7f4019de0221b 100644 (file)
@@ -736,13 +736,10 @@ cr_better_copy_file(const char *src, const char *in_dst, GError **err)
 
 int
 cr_remove_dir_cb(const char *fpath,
-                 const struct stat *sb,
-                 int typeflag,
-                 struct FTW *ftwbuf)
+                 G_GNUC_UNUSED const struct stat *sb,
+                 G_GNUC_UNUSED int typeflag,
+                 G_GNUC_UNUSED struct FTW *ftwbuf)
 {
-    CR_UNUSED(sb);
-    CR_UNUSED(typeflag);
-    CR_UNUSED(ftwbuf);
     int rv = remove(fpath);
     if (rv)
         g_warning("%s: Cannot remove: %s: %s", __func__, fpath, g_strerror(errno));
@@ -916,15 +913,11 @@ cr_cmp_version_str(const char* str1, const char *str2)
 
 
 void
-cr_null_log_fn(const gchar *log_domain,
-               GLogLevelFlags log_level,
-               const gchar *message,
-               gpointer user_data)
+cr_null_log_fn(G_GNUC_UNUSED const gchar *log_domain,
+               G_GNUC_UNUSED GLogLevelFlags log_level,
+               G_GNUC_UNUSED const gchar *message,
+               G_GNUC_UNUSED gpointer user_data)
 {
-    CR_UNUSED(log_domain);
-    CR_UNUSED(log_level);
-    CR_UNUSED(message);
-    CR_UNUSED(user_data);
     return;
 }
 
@@ -933,11 +926,8 @@ void
 cr_log_fn(const gchar *log_domain,
           GLogLevelFlags log_level,
           const gchar *message,
-          gpointer user_data)
+          G_GNUC_UNUSED gpointer user_data)
 {
-    CR_UNUSED(user_data);
-
-
     switch(log_level) {
         case G_LOG_LEVEL_ERROR:
             if (log_domain) g_printerr("%s: ", log_domain);
@@ -1249,14 +1239,11 @@ cr_cmp_evr(const char *e1, const char *v1, const char *r1,
 }
 
 int
-cr_warning_cb(cr_XmlParserWarningType type,
-           char *msg,
-           void *cbdata,
-           GError **err)
+cr_warning_cb(G_GNUC_UNUSED cr_XmlParserWarningType type,
+              char *msg,
+              void *cbdata,
+              G_GNUC_UNUSED GError **err)
 {
-    CR_UNUSED(type);
-    CR_UNUSED(err);
-
     g_warning("%s: %s", (char *) cbdata, msg);
 
     return CR_CB_RET_OK;
index 24a148045379e455604fe7fa3b6dd82d9933fd85..d5cd14694c2abeb320f3baa0440c4383bfefc979 100644 (file)
@@ -35,10 +35,6 @@ extern "C" {
  *  @{
  */
 
-/** Macro for supress compiler warning about unused param.
- */
-#define CR_UNUSED(x) (void)(x)
-
 /** Lenght of static string (including last '\0' byte)
  */
 #define CR_STATICSTRLEN(s) (sizeof(s)/sizeof(s[0]))
index ae78763dd85797393516905953b147989d53dabd..c991b3bffe03e6231cfc9b8ca7d3c377d59022a4 100644 (file)
@@ -141,15 +141,13 @@ cr_Package *
 cr_package_from_header(Header hdr,
                        int changelog_limit,
                        cr_HeaderReadingFlags hdrrflags,
-                       GError **err)
+                       G_GNUC_UNUSED GError **err)
 {
     cr_Package *pkg;
 
     assert(hdr);
     assert(!err || *err == NULL);
 
-    CR_UNUSED(err);  // In fact, GError is not used in this function yet.
-
     // Create new package structure
 
     pkg = cr_package_new();
index ed2dd37a4b52b25ad2dd3980131a37abb555a33d..7c3cb56c47bd0069d289d42030e27beb8da5e76e 100644 (file)
 #include "exception-py.h"
 
 PyObject *
-py_checksum_name_str(PyObject *self, PyObject *args)
+py_checksum_name_str(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
     int type;
 
-    CR_UNUSED(self);
-
     if (!PyArg_ParseTuple(args, "i:py_checksum_name_Str", &type))
         return NULL;
 
@@ -40,12 +38,10 @@ py_checksum_name_str(PyObject *self, PyObject *args)
 }
 
 PyObject *
-py_checksum_type(PyObject *self, PyObject *args)
+py_checksum_type(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
     char *type;
 
-    CR_UNUSED(self);
-
     if (!PyArg_ParseTuple(args, "s:py_checksum_type", &type))
         return NULL;
 
index 988766bf53e8595f68dceb1bc4fcca036b9a6793..fec802a364a9e46e244e6d737939a0cc59e3e2a1 100644 (file)
  */
 
 PyObject *
-py_compression_suffix(PyObject *self, PyObject *args)
+py_compression_suffix(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
     int type;
 
-    CR_UNUSED(self);
-
     if (!PyArg_ParseTuple(args, "i:py_compression_suffix", &type))
         return NULL;
 
@@ -44,14 +42,12 @@ py_compression_suffix(PyObject *self, PyObject *args)
 }
 
 PyObject *
-py_detect_compression(PyObject *self, PyObject *args)
+py_detect_compression(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
     long type;
     char *filename;
     GError *tmp_err = NULL;
 
-    CR_UNUSED(self);
-
     if (!PyArg_ParseTuple(args, "s:py_detect_compression", &filename))
         return NULL;
 
@@ -65,12 +61,10 @@ py_detect_compression(PyObject *self, PyObject *args)
 }
 
 PyObject *
-py_compression_type(PyObject *self, PyObject *args)
+py_compression_type(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
     char *name;
 
-    CR_UNUSED(self);
-
     if (!PyArg_ParseTuple(args, "z:py_compression_type", &name))
         return NULL;
 
@@ -105,10 +99,10 @@ check_CrFileStatus(const _CrFileObject *self)
 /* Function on the type */
 
 static PyObject *
-crfile_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+crfile_new(PyTypeObject *type,
+           G_GNUC_UNUSED PyObject *args,
+           G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
     _CrFileObject *self = (_CrFileObject *)type->tp_alloc(type, 0);
     if (self) {
         self->f = NULL;
@@ -118,7 +112,7 @@ crfile_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 }
 
 static int
-crfile_init(_CrFileObject *self, PyObject *args, PyObject *kwds)
+crfile_init(_CrFileObject *self, PyObject *args, G_GNUC_UNUSED PyObject *kwds)
 {
     char *path;
     int mode, comtype;
@@ -126,8 +120,6 @@ crfile_init(_CrFileObject *self, PyObject *args, PyObject *kwds)
     PyObject *py_stat, *ret;
     cr_ContentStat *stat;
 
-    CR_UNUSED(kwds);
-
     if (!PyArg_ParseTuple(args, "siiO|:crfile_init",
                           &path, &mode, &comtype, &py_stat))
         return -1;
@@ -236,12 +228,10 @@ PyDoc_STRVAR(close__doc__,
 "Close the file");
 
 static PyObject *
-py_close(_CrFileObject *self, void *nothing)
+py_close(_CrFileObject *self, G_GNUC_UNUSED void *nothing)
 {
     GError *tmp_err = NULL;
 
-    CR_UNUSED(nothing);
-
     if (self->f) {
         cr_close(self->f, &tmp_err);
         self->f = NULL;
index 1d741b70528ac0d20cba89d8dff6e4a5d3195733..d0301ae1797640ae80bf603ce7cd01b90574220c 100644 (file)
@@ -55,10 +55,10 @@ check_ContentStatStatus(const _ContentStatObject *self)
 /* Function on the type */
 
 static PyObject *
-contentstat_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+contentstat_new(PyTypeObject *type,
+                G_GNUC_UNUSED PyObject *args,
+                G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
     _ContentStatObject *self = (_ContentStatObject *)type->tp_alloc(type, 0);
     if (self)
         self->stat = NULL;
@@ -71,10 +71,10 @@ PyDoc_STRVAR(contentstat_init__doc__,
 "    :arg checksum_type: Type of checksum that should be used\n");
 
 static int
-contentstat_init(_ContentStatObject *self, PyObject *args, PyObject *kwds)
+contentstat_init(_ContentStatObject *self,
+                 PyObject *args,
+                 G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(kwds);
-
     int type;
     GError *tmp_err = NULL;
 
@@ -104,9 +104,8 @@ contentstat_dealloc(_ContentStatObject *self)
 }
 
 static PyObject *
-contentstat_repr(_ContentStatObject *self)
+contentstat_repr(G_GNUC_UNUSED _ContentStatObject *self)
 {
-    CR_UNUSED(self);
     return PyString_FromFormat("<createrepo_c.ContentStat object>");
 }
 
index c6bd92846565f28a799fbb35bebe75f579c06f55..7fcc0e0f6c243db45ccbee799b2e62488ee4330c 100644 (file)
@@ -51,11 +51,10 @@ check_MetadataStatus(const _MetadataObject *self)
 /* Function on the type */
 
 static PyObject *
-metadata_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+metadata_new(PyTypeObject *type,
+             G_GNUC_UNUSED PyObject *args,
+             G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
-
     _MetadataObject *self = (_MetadataObject *)type->tp_alloc(type, 0);
     if (self)
         self->md = NULL;
@@ -110,18 +109,16 @@ metadata_dealloc(_MetadataObject *self)
 }
 
 static PyObject *
-metadata_repr(_MetadataObject *self)
+metadata_repr(G_GNUC_UNUSED _MetadataObject *self)
 {
-    CR_UNUSED(self);
     return PyString_FromFormat("<createrepo_c.Metadata object>");
 }
 
 /* Getters */
 
 static PyObject *
-get_key(_MetadataObject *self, void *nothing)
+get_key(_MetadataObject *self, G_GNUC_UNUSED void *nothing)
 {
-    CR_UNUSED(nothing);
     if (check_MetadataStatus(self))
         return NULL;
     cr_HashTableKey val = cr_metadata_key(self->md);
@@ -191,9 +188,8 @@ PyDoc_STRVAR(len__doc__,
 "Number of packages");
 
 static PyObject *
-ht_len(_MetadataObject *self, PyObject *noarg)
+ht_len(_MetadataObject *self, G_GNUC_UNUSED PyObject *noarg)
 {
-    CR_UNUSED(noarg);
     unsigned long len = 0;
     if (check_MetadataStatus(self))
         return NULL;
@@ -251,10 +247,8 @@ PyDoc_STRVAR(keys__doc__,
 "List of all keys");
 
 static PyObject *
-ht_keys(_MetadataObject *self, PyObject *args)
+ht_keys(_MetadataObject *self, G_GNUC_UNUSED PyObject *args)
 {
-    CR_UNUSED(args);
-
     if (check_MetadataStatus(self))
         return NULL;
 
index daa0c056f606fb6a3f8cabc9ca576320b72209c9..e69eab35286dd49429170455afac93c8ff54f7b5 100644 (file)
@@ -55,11 +55,10 @@ check_MetadataLocationStatus(const _MetadataLocationObject *self)
 /* Function on the type */
 
 static PyObject *
-metadatalocation_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+metadatalocation_new(PyTypeObject *type,
+                     G_GNUC_UNUSED PyObject *args,
+                     G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
-
     _MetadataLocationObject *self = (_MetadataLocationObject *)type->tp_alloc(type, 0);
     if (self)
         self->ml = NULL;
@@ -74,9 +73,10 @@ PyDoc_STRVAR(metadatalocation_init__doc__,
 "                    databases will not be downloaded)\n");
 
 static int
-metadatalocation_init(_MetadataLocationObject *self, PyObject *args, PyObject *kwds)
+metadatalocation_init(_MetadataLocationObject *self,
+                      PyObject *args,
+                      G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(kwds);
     char *repopath;
     PyObject *py_ignore_db = NULL;
     GError *tmp_err = NULL;
@@ -107,9 +107,8 @@ metadatalocation_dealloc(_MetadataLocationObject *self)
 }
 
 static PyObject *
-metadatalocation_repr(_MetadataLocationObject *self)
+metadatalocation_repr(G_GNUC_UNUSED _MetadataLocationObject *self)
 {
-    CR_UNUSED(self);
     return PyString_FromFormat("<createrepo_c.MetadataLocation object>");
 }
 
index 1a90ba3eb6ea00a35473270ccaf481fb3ed41502..2582eddc6e9f314c3f6abc4b414323f617fbe60f 100644 (file)
@@ -29,7 +29,7 @@
 #include "contentstat-py.h"
 
 PyObject *
-py_compress_file_with_stat(PyObject *self, PyObject *args)
+py_compress_file_with_stat(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
     int type;
     char *src, *dst;
@@ -37,8 +37,6 @@ py_compress_file_with_stat(PyObject *self, PyObject *args)
     cr_ContentStat *contentstat;
     GError *tmp_err = NULL;
 
-    CR_UNUSED(self);
-
     if (!PyArg_ParseTuple(args, "sziO:py_compress_file", &src, &dst, &type,
                           &py_contentstat))
         return NULL;
@@ -61,7 +59,7 @@ py_compress_file_with_stat(PyObject *self, PyObject *args)
 }
 
 PyObject *
-py_decompress_file_with_stat(PyObject *self, PyObject *args)
+py_decompress_file_with_stat(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
     int type;
     char *src, *dst;
@@ -69,8 +67,6 @@ py_decompress_file_with_stat(PyObject *self, PyObject *args)
     cr_ContentStat *contentstat;
     GError *tmp_err = NULL;
 
-    CR_UNUSED(self);
-
     if (!PyArg_ParseTuple(args, "sziO:py_decompress_file", &src, &dst, &type,
                           &py_contentstat))
         return NULL;
index c7cc3795427bddb1c3b3330d78881bbaa1860ae1..e31c77d8ca85c28108159cbdba64be830c736890 100644 (file)
@@ -89,10 +89,10 @@ check_PackageStatus(const _PackageObject *self)
 /* Function on the type */
 
 static PyObject *
-package_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+package_new(PyTypeObject *type,
+            G_GNUC_UNUSED PyObject *args,
+            G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
     _PackageObject *self = (_PackageObject *)type->tp_alloc(type, 0);
     if (self) {
         self->package = NULL;
@@ -180,9 +180,8 @@ PyDoc_STRVAR(nvra__doc__,
 "Package NVRA string (Name-Version-Release-Architecture)");
 
 static PyObject *
-nvra(_PackageObject *self, void *nothing)
+nvra(_PackageObject *self, G_GNUC_UNUSED void *nothing)
 {
-    CR_UNUSED(nothing);
     PyObject *pystr;
     if (check_PackageStatus(self))
         return NULL;
@@ -197,9 +196,8 @@ PyDoc_STRVAR(nevra__doc__,
 "Package NEVRA string (Name-Epoch-Version-Release-Architecture)");
 
 static PyObject *
-nevra(_PackageObject *self, void *nothing)
+nevra(_PackageObject *self, G_GNUC_UNUSED void *nothing)
 {
-    CR_UNUSED(nothing);
     PyObject *pystr;
     if (check_PackageStatus(self))
         return NULL;
@@ -214,9 +212,8 @@ PyDoc_STRVAR(copy__doc__,
 "Copy of the package object");
 
 static PyObject *
-copy_pkg(_PackageObject *self, void *nothing)
+copy_pkg(_PackageObject *self, G_GNUC_UNUSED void *nothing)
 {
-    CR_UNUSED(nothing);
     if (check_PackageStatus(self))
         return NULL;
     return Object_FromPackage(cr_package_copy(self->package), 1);
index 936d2fb94eaed9d5951779c9d47ae4bd7c75655f..73ec98364925b833d3800c29795cf87139046f01 100644 (file)
 #include "exception-py.h"
 
 PyObject *
-py_package_from_rpm(PyObject *self, PyObject *args)
+py_package_from_rpm(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
-    CR_UNUSED(self);
-
     PyObject *ret;
     cr_Package *pkg;
     int checksum_type, changelog_limit;
@@ -62,10 +60,8 @@ py_package_from_rpm(PyObject *self, PyObject *args)
 }
 
 PyObject *
-py_xml_from_rpm(PyObject *self, PyObject *args)
+py_xml_from_rpm(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
-    CR_UNUSED(self);
-
     PyObject *tuple;
     int checksum_type, changelog_limit;
     char *filename, *location_href, *location_base;
index 1e9a9999028097f87da45e7aca1a4ab49911f9bb..f90b4b8a3a867e2c5db0ddf1c7eabb264dc25bda 100644 (file)
@@ -56,11 +56,10 @@ check_RepomdStatus(const _RepomdObject *self)
 /* Function on the type */
 
 static PyObject *
-repomd_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+repomd_new(PyTypeObject *type,
+           G_GNUC_UNUSED PyObject *args,
+           G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
-
     _RepomdObject *self = (_RepomdObject *)type->tp_alloc(type, 0);
     if (self) {
         self->repomd = NULL;
@@ -72,11 +71,10 @@ PyDoc_STRVAR(repomd_init__doc__,
 "Repomd object");
 
 static int
-repomd_init(_RepomdObject *self, PyObject *args, PyObject *kwds)
+repomd_init(_RepomdObject *self,
+            G_GNUC_UNUSED PyObject *args,
+            G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
-
     /* Free all previous resources when reinitialization */
     if (self->repomd) {
         cr_repomd_free(self->repomd);
@@ -101,9 +99,8 @@ repomd_dealloc(_RepomdObject *self)
 }
 
 static PyObject *
-repomd_repr(_RepomdObject *self)
+repomd_repr(G_GNUC_UNUSED _RepomdObject *self)
 {
-    CR_UNUSED(self);
     return PyString_FromFormat("<createrepo_c.Repomd object>");
 }
 
@@ -234,9 +231,8 @@ PyDoc_STRVAR(sort_records__doc__,
 "Sort repomd records to the createrepo_c prefered order");
 
 static PyObject *
-sort_records(_RepomdObject *self, void *nothing)
+sort_records(_RepomdObject *self, G_GNUC_UNUSED void *nothing)
 {
-    CR_UNUSED(nothing);
     cr_repomd_sort_records(self->repomd);
     Py_RETURN_NONE;
 }
@@ -246,9 +242,8 @@ PyDoc_STRVAR(xml_dump__doc__,
 "Generate xml representation of the repomd");
 
 static PyObject *
-xml_dump(_RepomdObject *self, void *nothing)
+xml_dump(_RepomdObject *self, G_GNUC_UNUSED void *nothing)
 {
-    CR_UNUSED(nothing);
     PyObject *py_str;
     GError *tmp_err = NULL;
     char *xml = cr_xml_dump_repomd(self->repomd, &tmp_err);
index 019e1e4ccf2a20c7fe79614c3718acae1e045c46..a85ca9f1e6ce56c4f8baa43269a6180f3ad6920a 100644 (file)
@@ -73,10 +73,10 @@ check_RepomdRecordStatus(const _RepomdRecordObject *self)
 /* Function on the type */
 
 static PyObject *
-repomdrecord_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+repomdrecord_new(PyTypeObject *type,
+                 G_GNUC_UNUSED PyObject *args,
+                 G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
     _RepomdRecordObject *self = (_RepomdRecordObject *)type->tp_alloc(type, 0);
     if (self) {
         self->record = NULL;
@@ -90,10 +90,10 @@ PyDoc_STRVAR(repomdrecord_init__doc__,
 "    :arg path: Path to the file\n");
 
 static int
-repomdrecord_init(_RepomdRecordObject *self, PyObject *args, PyObject *kwds)
+repomdrecord_init(_RepomdRecordObject *self,
+                  PyObject *args,
+                  G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(kwds);
-
     char *type = NULL, *path = NULL;
 
     if (!PyArg_ParseTuple(args, "|zz:repomdrecord_init", &type, &path))
@@ -122,9 +122,8 @@ repomdrecord_dealloc(_RepomdRecordObject *self)
 }
 
 static PyObject *
-repomdrecord_repr(_RepomdRecordObject *self)
+repomdrecord_repr(G_GNUC_UNUSED _RepomdRecordObject *self)
 {
-    CR_UNUSED(self);
     if (self->record->type)
         return PyString_FromFormat("<createrepo_c.RepomdRecord %s object>",
                                    self->record->type);
@@ -139,9 +138,8 @@ PyDoc_STRVAR(copy__doc__,
 "Return copy of the RepomdRecord object");
 
 static PyObject *
-copy_repomdrecord(_RepomdRecordObject *self, void *nothing)
+copy_repomdrecord(_RepomdRecordObject *self, G_GNUC_UNUSED void *nothing)
 {
-    CR_UNUSED(nothing);
     if (check_RepomdRecordStatus(self))
         return NULL;
     return Object_FromRepomdRecord(cr_repomd_record_copy(self->record));
@@ -214,12 +212,10 @@ PyDoc_STRVAR(rename_file__doc__,
 "Add (prepend) file checksum to the filename");
 
 static PyObject *
-rename_file(_RepomdRecordObject *self, void *nothing)
+rename_file(_RepomdRecordObject *self, G_GNUC_UNUSED void *nothing)
 {
     GError *err = NULL;
 
-    CR_UNUSED(nothing);
-
     cr_repomd_record_rename_file(self->record, &err);
     if (err) {
         nice_exception(&err, NULL);
index cb8f373353cbeab1b5b3868a6810ccf636b0e8a8..eb45b806681d5ad3fd0ebc52b266da63003c30a4 100644 (file)
@@ -51,10 +51,10 @@ check_SqliteStatus(const _SqliteObject *self)
 /* Function on the type */
 
 static PyObject *
-sqlite_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+sqlite_new(PyTypeObject *type,
+           G_GNUC_UNUSED PyObject *args,
+           G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
     _SqliteObject *self = (_SqliteObject *)type->tp_alloc(type, 0);
     if (self)
         self->db = NULL;
@@ -68,15 +68,13 @@ PyDoc_STRVAR(sqlite_init__doc__,
 "    :arg db_type: One from DB_PRIMARY, DB_FILELISTS, DB_OTHER constans\n");
 
 static int
-sqlite_init(_SqliteObject *self, PyObject *args, PyObject *kwds)
+sqlite_init(_SqliteObject *self, PyObject *args, G_GNUC_UNUSED PyObject *kwds)
 {
     char *path;
     int db_type;
     GError *err = NULL;
     PyObject *ret;
 
-    CR_UNUSED(kwds);
-
     if (!PyArg_ParseTuple(args, "si|:sqlite_init", &path, &db_type))
         return -1;
 
@@ -181,12 +179,10 @@ PyDoc_STRVAR(close__doc__,
 "Close the sqlite database");
 
 static PyObject *
-close_db(_SqliteObject *self, void *nothing)
+close_db(_SqliteObject *self, G_GNUC_UNUSED void *nothing)
 {
     GError *err = NULL;
 
-    CR_UNUSED(nothing);
-
     if (self->db) {
         cr_db_close(self->db, &err);
         self->db = NULL;
index f55e671be475f8a09b3ddab2039a40d3b606afc1..98d525050d1a7af963fa793fc7ec6870ce872efe 100644 (file)
@@ -74,10 +74,10 @@ check_UpdateCollectionStatus(const _UpdateCollectionObject *self)
 /* Function on the type */
 
 static PyObject *
-updatecollection_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+updatecollection_new(PyTypeObject *type,
+                     G_GNUC_UNUSED PyObject *args,
+                     G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
     _UpdateCollectionObject *self = (_UpdateCollectionObject *)type->tp_alloc(type, 0);
     if (self) {
         self->collection = NULL;
@@ -89,11 +89,10 @@ PyDoc_STRVAR(updatecollection_init__doc__,
 ".. method:: __init__()\n\n");
 
 static int
-updatecollection_init(_UpdateCollectionObject *self, PyObject *args, PyObject *kwds)
+updatecollection_init(_UpdateCollectionObject *self,
+                      G_GNUC_UNUSED PyObject *args,
+                      G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
-
     /* Free all previous resources when reinitialization */
     if (self->collection)
         cr_updatecollection_free(self->collection);
@@ -117,9 +116,8 @@ updatecollection_dealloc(_UpdateCollectionObject *self)
 }
 
 static PyObject *
-updatecollection_repr(_UpdateCollectionObject *self)
+updatecollection_repr(G_GNUC_UNUSED _UpdateCollectionObject *self)
 {
-    CR_UNUSED(self);
     return PyString_FromFormat("<createrepo_c.UpdateCollection object>");
 }
 
@@ -153,9 +151,9 @@ PyDoc_STRVAR(copy__doc__,
 "Return copy of the UpdateCollection object");
 
 static PyObject *
-copy_updatecollection(_UpdateCollectionObject *self, void *nothing)
+copy_updatecollection(_UpdateCollectionObject *self,
+                      G_GNUC_UNUSED void *nothing)
 {
-    CR_UNUSED(nothing);
     if (check_UpdateCollectionStatus(self))
         return NULL;
     return Object_FromUpdateCollection(cr_updatecollection_copy(self->collection));
index e71348f2d2aa284b317e4330a29b4a21a4ac9106..cfafeac00f71e440a19a717f7ccebcff6c4ce7a4 100644 (file)
@@ -73,10 +73,10 @@ check_UpdateCollectionPackageStatus(const _UpdateCollectionPackageObject *self)
 /* Function on the type */
 
 static PyObject *
-updatecollectionpackage_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+updatecollectionpackage_new(PyTypeObject *type,
+                            G_GNUC_UNUSED PyObject *args,
+                            G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
     _UpdateCollectionPackageObject *self = (_UpdateCollectionPackageObject *)type->tp_alloc(type, 0);
     if (self) {
         self->pkg = NULL;
@@ -88,11 +88,10 @@ PyDoc_STRVAR(updatecollectionpackage_init__doc__,
 ".. method:: __init__()\n\n");
 
 static int
-updatecollectionpackage_init(_UpdateCollectionPackageObject *self, PyObject *args, PyObject *kwds)
+updatecollectionpackage_init(_UpdateCollectionPackageObject *self,
+                             G_GNUC_UNUSED PyObject *args,
+                             G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
-
     /* Free all previous resources when reinitialization */
     if (self->pkg)
         cr_updatecollectionpackage_free(self->pkg);
@@ -116,9 +115,8 @@ updatecollectionpackage_dealloc(_UpdateCollectionPackageObject *self)
 }
 
 static PyObject *
-updatecollectionpackage_repr(_UpdateCollectionPackageObject *self)
+updatecollectionpackage_repr(G_GNUC_UNUSED _UpdateCollectionPackageObject *self)
 {
-    CR_UNUSED(self);
     return PyString_FromFormat("<createrepo_c.UpdateCollectionPackage object>");
 }
 
@@ -129,9 +127,9 @@ PyDoc_STRVAR(copy__doc__,
 "Return copy of the UpdateCollectionPackage object");
 
 static PyObject *
-copy_updatecollectionpackage(_UpdateCollectionPackageObject *self, void *nothing)
+copy_updatecollectionpackage(_UpdateCollectionPackageObject *self,
+                             G_GNUC_UNUSED void *nothing)
 {
-    CR_UNUSED(nothing);
     if (check_UpdateCollectionPackageStatus(self))
         return NULL;
     return Object_FromUpdateCollectionPackage(cr_updatecollectionpackage_copy(self->pkg));
index 271411013d72a3e903794a6d3361f6fb88b4c2ca..a7b97758133d9ad9945c74b2f06f6bcab6189b43 100644 (file)
@@ -56,11 +56,10 @@ check_UpdateInfoStatus(const _UpdateInfoObject *self)
 /* Function on the type */
 
 static PyObject *
-updateinfo_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+updateinfo_new(PyTypeObject *type,
+               G_GNUC_UNUSED PyObject *args,
+               G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
-
     _UpdateInfoObject *self = (_UpdateInfoObject *)type->tp_alloc(type, 0);
     if (self) {
         self->updateinfo = NULL;
@@ -72,11 +71,10 @@ PyDoc_STRVAR(updateinfo_init__doc__,
 "UpdateInfo object");
 
 static int
-updateinfo_init(_UpdateInfoObject *self, PyObject *args, PyObject *kwds)
+updateinfo_init(_UpdateInfoObject *self,
+                G_GNUC_UNUSED PyObject *args,
+                G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
-
     /* Free all previous resources when reinitialization */
     if (self->updateinfo) {
         cr_updateinfo_free(self->updateinfo);
@@ -101,9 +99,8 @@ updateinfo_dealloc(_UpdateInfoObject *self)
 }
 
 static PyObject *
-updateinfo_repr(_UpdateInfoObject *self)
+updateinfo_repr(G_GNUC_UNUSED _UpdateInfoObject *self)
 {
-    CR_UNUSED(self);
     return PyString_FromFormat("<createrepo_c.UpdateInfo object>");
 }
 
@@ -135,9 +132,8 @@ PyDoc_STRVAR(xml_dump__doc__,
 "Generate xml representation of the updateinfo");
 
 static PyObject *
-xml_dump(_UpdateInfoObject *self, void *nothing)
+xml_dump(_UpdateInfoObject *self, G_GNUC_UNUSED void *nothing)
 {
-    CR_UNUSED(nothing);
     PyObject *py_str;
     GError *tmp_err = NULL;
     char *xml = cr_xml_dump_updateinfo(self->updateinfo, &tmp_err);
index be3d1a6b1c3003a6d06a5ad39919df352b373b5a..13d5e3fe062c96c807c22aff6de312ea18c5535e 100644 (file)
@@ -77,10 +77,10 @@ check_UpdateRecordStatus(const _UpdateRecordObject *self)
 /* Function on the type */
 
 static PyObject *
-updaterecord_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+updaterecord_new(PyTypeObject *type,
+                 G_GNUC_UNUSED PyObject *args,
+                 G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
     _UpdateRecordObject *self = (_UpdateRecordObject *)type->tp_alloc(type, 0);
     if (self) {
         self->record = NULL;
@@ -92,11 +92,10 @@ PyDoc_STRVAR(updaterecord_init__doc__,
 ".. method:: __init__()\n\n");
 
 static int
-updaterecord_init(_UpdateRecordObject *self, PyObject *args, PyObject *kwds)
+updaterecord_init(_UpdateRecordObject *self,
+                  G_GNUC_UNUSED PyObject *args,
+                  G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
-
     /* Free all previous resources when reinitialization */
     if (self->record)
         cr_updaterecord_free(self->record);
@@ -120,9 +119,8 @@ updaterecord_dealloc(_UpdateRecordObject *self)
 }
 
 static PyObject *
-updaterecord_repr(_UpdateRecordObject *self)
+updaterecord_repr(G_GNUC_UNUSED _UpdateRecordObject *self)
 {
-    CR_UNUSED(self);
     return PyString_FromFormat("<createrepo_c.UpdateRecord object>");
 }
 
@@ -178,9 +176,8 @@ PyDoc_STRVAR(copy__doc__,
 "Return copy of the UpdateRecord object");
 
 static PyObject *
-copy_updaterecord(_UpdateRecordObject *self, void *nothing)
+copy_updaterecord(_UpdateRecordObject *self, G_GNUC_UNUSED void *nothing)
 {
-    CR_UNUSED(nothing);
     if (check_UpdateRecordStatus(self))
         return NULL;
     return Object_FromUpdateRecord(cr_updaterecord_copy(self->record));
index a83ded65a843b56be34fccbfa680ec978d10a421..02478a69defa8cb6a9c92c203896584ffcdd6f3d 100644 (file)
@@ -73,10 +73,10 @@ check_UpdateReferenceStatus(const _UpdateReferenceObject *self)
 /* Function on the type */
 
 static PyObject *
-updatereference_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+updatereference_new(PyTypeObject *type,
+                    G_GNUC_UNUSED PyObject *args,
+                    G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
     _UpdateReferenceObject *self = (_UpdateReferenceObject *)type->tp_alloc(type, 0);
     if (self) {
         self->reference = NULL;
@@ -88,11 +88,10 @@ PyDoc_STRVAR(updatereference_init__doc__,
 ".. method:: __init__()\n\n");
 
 static int
-updatereference_init(_UpdateReferenceObject *self, PyObject *args, PyObject *kwds)
+updatereference_init(_UpdateReferenceObject *self,
+                     G_GNUC_UNUSED PyObject *args,
+                     G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
-
     /* Free all previous resources when reinitialization */
     if (self->reference)
         cr_updatereference_free(self->reference);
@@ -116,9 +115,8 @@ updatereference_dealloc(_UpdateReferenceObject *self)
 }
 
 static PyObject *
-updatereference_repr(_UpdateReferenceObject *self)
+updatereference_repr(G_GNUC_UNUSED _UpdateReferenceObject *self)
 {
-    CR_UNUSED(self);
     if (self->reference->type)
         return PyString_FromFormat("<createrepo_c.UpdateReference %s object>",
                                    self->reference->type);
@@ -133,9 +131,8 @@ PyDoc_STRVAR(copy__doc__,
 "Return copy of the UpdateReference object");
 
 static PyObject *
-copy_updatereference(_UpdateReferenceObject *self, void *nothing)
+copy_updatereference(_UpdateReferenceObject *self, G_GNUC_UNUSED void *nothing)
 {
-    CR_UNUSED(nothing);
     if (check_UpdateReferenceStatus(self))
         return NULL;
     return Object_FromUpdateReference(cr_updatereference_copy(self->reference));
index ad2747d90c4f5375b5c3ae9315ffd5a4ba97ec16..1e737889f6234342f1109d00dfaf3cc18ea74541 100644 (file)
 #include "updaterecord-py.h"
 
 PyObject *
-py_xml_dump_primary(PyObject *self, PyObject *args)
+py_xml_dump_primary(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
     PyObject *py_pkg, *py_str;
     char *xml;
     GError *err = NULL;
 
-    CR_UNUSED(self);
-
     if (!PyArg_ParseTuple(args, "O!:py_xml_dump_primary", &Package_Type, &py_pkg))
         return NULL;
 
@@ -52,14 +50,12 @@ py_xml_dump_primary(PyObject *self, PyObject *args)
 }
 
 PyObject *
-py_xml_dump_filelists(PyObject *self, PyObject *args)
+py_xml_dump_filelists(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
     PyObject *py_pkg, *py_str;
     char *xml;
     GError *err = NULL;
 
-    CR_UNUSED(self);
-
     if (!PyArg_ParseTuple(args, "O!:py_xml_dump_filelists", &Package_Type, &py_pkg))
         return NULL;
 
@@ -75,14 +71,12 @@ py_xml_dump_filelists(PyObject *self, PyObject *args)
 }
 
 PyObject *
-py_xml_dump_other(PyObject *self, PyObject *args)
+py_xml_dump_other(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
     PyObject *py_pkg, *py_str;
     char *xml;
     GError *err = NULL;
 
-    CR_UNUSED(self);
-
     if (!PyArg_ParseTuple(args, "O!:py_xml_dump_other", &Package_Type, &py_pkg))
         return NULL;
 
@@ -98,14 +92,12 @@ py_xml_dump_other(PyObject *self, PyObject *args)
 }
 
 PyObject *
-py_xml_dump(PyObject *self, PyObject *args)
+py_xml_dump(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
     PyObject *py_pkg, *tuple;
     struct cr_XmlStruct xml_res;
     GError *err = NULL;
 
-    CR_UNUSED(self);
-
     if (!PyArg_ParseTuple(args, "O!:py_xml_dump", &Package_Type, &py_pkg))
         return NULL;
 
@@ -135,14 +127,12 @@ py_xml_dump(PyObject *self, PyObject *args)
 }
 
 PyObject *
-py_xml_dump_updaterecord(PyObject *self, PyObject *args)
+py_xml_dump_updaterecord(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
     PyObject *py_rec, *py_str;
     char *xml = NULL;
     GError *err = NULL;
 
-    CR_UNUSED(self);
-
     if (!PyArg_ParseTuple(args, "O!:py_xml_dump_updaterecord",
                           &UpdateRecord_Type, &py_rec))
         return NULL;
index 522d49669509b8653b3ffe4307f1fba7e01d2107..1d83a0a4f556401aefa9a64bcef6d9733f4049eb 100644 (file)
@@ -51,10 +51,10 @@ check_XmlFileStatus(const _XmlFileObject *self)
 /* Function on the type */
 
 static PyObject *
-xmlfile_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+xmlfile_new(PyTypeObject *type,
+            G_GNUC_UNUSED PyObject *args,
+            G_GNUC_UNUSED PyObject *kwds)
 {
-    CR_UNUSED(args);
-    CR_UNUSED(kwds);
     _XmlFileObject *self = (_XmlFileObject *)type->tp_alloc(type, 0);
     if (self) {
         self->xmlfile = NULL;
@@ -73,7 +73,7 @@ PyDoc_STRVAR(xmlfile_init__doc__,
 "    :arg contentstat: ContentStat object to gather content statistics or None");
 
 static int
-xmlfile_init(_XmlFileObject *self, PyObject *args, PyObject *kwds)
+xmlfile_init(_XmlFileObject *self, PyObject *args, G_GNUC_UNUSED PyObject *kwds)
 {
     char *path;
     int type, comtype;
@@ -81,8 +81,6 @@ xmlfile_init(_XmlFileObject *self, PyObject *args, PyObject *kwds)
     PyObject *py_stat, *ret;
     cr_ContentStat *stat;
 
-    CR_UNUSED(kwds);
-
     if (!PyArg_ParseTuple(args, "siiO|:xmlfile_init",
                           &path, &type, &comtype, &py_stat))
         return -1;
@@ -242,12 +240,10 @@ PyDoc_STRVAR(close__doc__,
 "Close the XML file");
 
 static PyObject *
-xmlfile_close(_XmlFileObject *self, void *nothing)
+xmlfile_close(_XmlFileObject *self, G_GNUC_UNUSED void *nothing)
 {
     GError *err = NULL;
 
-    CR_UNUSED(nothing);
-
     if (self->xmlfile) {
         cr_xmlfile_close(self->xmlfile, &err);
         self->xmlfile = NULL;
index e8481f8eb0777a3589aeab7c70daed0653f1da77..f191c7cef4a1b1e566fe0601ece7d2f754abd2f2 100644 (file)
@@ -136,10 +136,8 @@ c_warningcb(cr_XmlParserWarningType type,
 }
 
 PyObject *
-py_xml_parse_primary(PyObject *self, PyObject *args)
+py_xml_parse_primary(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
-    CR_UNUSED(self);
-
     char *filename;
     int do_files;
     PyObject *py_newpkgcb, *py_pkgcb, *py_warningcb;
@@ -219,10 +217,8 @@ py_xml_parse_primary(PyObject *self, PyObject *args)
 }
 
 PyObject *
-py_xml_parse_filelists(PyObject *self, PyObject *args)
+py_xml_parse_filelists(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
-    CR_UNUSED(self);
-
     char *filename;
     PyObject *py_newpkgcb, *py_pkgcb, *py_warningcb;
     CbData cbdata;
@@ -299,10 +295,8 @@ py_xml_parse_filelists(PyObject *self, PyObject *args)
 }
 
 PyObject *
-py_xml_parse_other(PyObject *self, PyObject *args)
+py_xml_parse_other(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
-    CR_UNUSED(self);
-
     char *filename;
     PyObject *py_newpkgcb, *py_pkgcb, *py_warningcb;
     CbData cbdata;
@@ -379,10 +373,8 @@ py_xml_parse_other(PyObject *self, PyObject *args)
 }
 
 PyObject *
-py_xml_parse_repomd(PyObject *self, PyObject *args)
+py_xml_parse_repomd(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
-    CR_UNUSED(self);
-
     char *filename;
     PyObject *py_repomd, *py_warningcb;
     CbData cbdata;
@@ -435,10 +427,8 @@ py_xml_parse_repomd(PyObject *self, PyObject *args)
 }
 
 PyObject *
-py_xml_parse_updateinfo(PyObject *self, PyObject *args)
+py_xml_parse_updateinfo(G_GNUC_UNUSED PyObject *self, PyObject *args)
 {
-    CR_UNUSED(self);
-
     char *filename;
     PyObject *py_updateinfo, *py_warningcb;
     CbData cbdata;
index d27552b21c318e544aa92e49f03046f214cc8b59..8ca3c6dcbd2bd49c9fcd0ecdc80ab756a5ca58eb 100644 (file)
@@ -358,10 +358,8 @@ db_create_other_tables (sqlite3 *db, GError **err)
 
 
 static void
-db_tweak(sqlite3 *db, GError **err)
+db_tweak(sqlite3 *db, G_GNUC_UNUSED GError **err)
 {
-    CR_UNUSED(err);
-
     assert(!err || *err == NULL);
 
     // Do not wait for disk writes to be fully
index 5dd316b43b41395285cdb05f61fb9477f1e27a49..aee07d132a163352453927adb025b38924b7dcd4 100644 (file)
@@ -80,13 +80,11 @@ cr_compressiontask_free(cr_CompressionTask *task, GError **err)
 }
 
 void
-cr_compressing_thread(gpointer data, gpointer user_data)
+cr_compressing_thread(gpointer data, G_GNUC_UNUSED gpointer user_data)
 {
     cr_CompressionTask *task = data;
     GError *tmp_err = NULL;
 
-    CR_UNUSED(user_data);
-
     assert(task);
 
     if (!task->dst)
@@ -141,13 +139,11 @@ cr_repomdrecordfilltask_free(cr_RepomdRecordFillTask *task,
 }
 
 void
-cr_repomd_record_fill_thread(gpointer data, gpointer user_data)
+cr_repomd_record_fill_thread(gpointer data, G_GNUC_UNUSED gpointer user_data)
 {
     cr_RepomdRecordFillTask *task = data;
     GError *tmp_err = NULL;
 
-    CR_UNUSED(user_data);
-
     assert(task);
 
     cr_repomd_record_fill(task->record, task->checksum_type, &tmp_err);
index c2378f13e33ec04ac89b2a284dec42667be1328d..386247e7c17239a08f81d94845cc057de1a1ef0f 100644 (file)
@@ -143,17 +143,12 @@ cr_xml_parser_strtoll(cr_ParserData *pd,
 
 int
 cr_newpkgcb(cr_Package **pkg,
-            const char *pkgId,
-            const char *name,
-            const char *arch,
-            void *cbdata,
+            G_GNUC_UNUSED const char *pkgId,
+            G_GNUC_UNUSED const char *name,
+            G_GNUC_UNUSED const char *arch,
+            G_GNUC_UNUSED void *cbdata,
             GError **err)
 {
-    CR_UNUSED(pkgId);
-    CR_UNUSED(name);
-    CR_UNUSED(arch);
-    CR_UNUSED(cbdata);
-
     assert(pkg && *pkg == NULL);
     assert(!err || *err == NULL);
 
index 7ae6a35755471e904a3be7ab53b7ecd257d99c99..1eede01ebd77e76a034207876ba933d00fdf1b9d 100644 (file)
@@ -201,14 +201,12 @@ cr_start_handler(void *pdata, const char *element, const char **attr)
 }
 
 static void XMLCALL
-cr_end_handler(void *pdata, const char *element)
+cr_end_handler(void *pdata, G_GNUC_UNUSED const char *element)
 {
     cr_ParserData *pd = pdata;
     GError *tmp_err = NULL;
     unsigned int state = pd->state;
 
-    CR_UNUSED(element);
-
     if (pd->err)
         return; // There was an error -> do nothing
 
index b6606c0ba2360c527fd6062eb5a3d8e78437f9a2..4662f32632eb3c91253b32f46374b84d98b920cb 100644 (file)
@@ -210,14 +210,12 @@ cr_start_handler(void *pdata, const char *element, const char **attr)
 }
 
 static void XMLCALL
-cr_end_handler(void *pdata, const char *element)
+cr_end_handler(void *pdata, G_GNUC_UNUSED const char *element)
 {
     cr_ParserData *pd = pdata;
     GError *tmp_err = NULL;
     unsigned int state = pd->state;
 
-    CR_UNUSED(element);
-
     if (pd->err)
         return; // There was an error -> do nothing
 
index 4c1b7e7db990f9364284ec6f1899c25c1b3b3e28..bc2acc35ebbe1c2845fca0bf081bd6e02047add4 100644 (file)
@@ -448,14 +448,12 @@ cr_start_handler(void *pdata, const char *element, const char **attr)
 }
 
 static void XMLCALL
-cr_end_handler(void *pdata, const char *element)
+cr_end_handler(void *pdata, G_GNUC_UNUSED const char *element)
 {
     cr_ParserData *pd = pdata;
     GError *tmp_err = NULL;
     unsigned int state = pd->state;
 
-    CR_UNUSED(element);
-
     if (pd->err)
         return; // There was an error -> do nothing
 
index dba2b55edadbe6f8d9fb2697ec59a18e8531158b..2158c1766db3d2a697ac1f60a165bfdce47a825c 100644 (file)
@@ -241,13 +241,11 @@ cr_start_handler(void *pdata, const char *element, const char **attr)
 }
 
 static void XMLCALL
-cr_end_handler(void *pdata, const char *element)
+cr_end_handler(void *pdata, G_GNUC_UNUSED const char *element)
 {
     cr_ParserData *pd = pdata;
     unsigned int state = pd->state;
 
-    CR_UNUSED(element);
-
     if (pd->err)
         return; // There was an error -> do nothing
 
index ab84b65e37adbf8eea4f6b981039f6948784f8d4..18e52776bbce04a500670a269b56308754ef7473 100644 (file)
@@ -320,13 +320,11 @@ cr_start_handler(void *pdata, const char *element, const char **attr)
 }
 
 static void XMLCALL
-cr_end_handler(void *pdata, const char *element)
+cr_end_handler(void *pdata, G_GNUC_UNUSED const char *element)
 {
     cr_ParserData *pd = pdata;
     unsigned int state = pd->state;
 
-    CR_UNUSED(element);
-
     if (pd->err)
         return; // There was an error -> do nothing
 
index badc4bf1dea62707a9899deafd205fc4cb7d77b7..75b5279217bd09d79c014c0c4b57c0416942f7c1 100644 (file)
@@ -289,9 +289,8 @@ typedef struct {
 
 
 static void
-outputtest_setup(Outputtest *outputtest, gconstpointer test_data)
+outputtest_setup(Outputtest *outputtest, G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
     int fd;
 
     fd = g_file_open_tmp(TMP_FILE_PATTERN, &(outputtest->tmp_filename), NULL);
@@ -300,10 +299,8 @@ outputtest_setup(Outputtest *outputtest, gconstpointer test_data)
 
 
 static void
-outputtest_teardown(Outputtest *outputtest, gconstpointer test_data)
+outputtest_teardown(Outputtest *outputtest, G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
-
     if (outputtest->tmp_filename) {
         remove(outputtest->tmp_filename);
         g_free(outputtest->tmp_filename);
@@ -363,10 +360,9 @@ test_helper_cw_output(int type,
 
 
 static void
-outputtest_cw_output(Outputtest *outputtest, gconstpointer test_data)
+outputtest_cw_output(Outputtest *outputtest,
+                     G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
-
     // Plain
 
     test_helper_cw_output(OUTPUT_TYPE_WRITE,  outputtest->tmp_filename,
@@ -557,15 +553,14 @@ test_cr_error_handling(void)
 
 
 static void
-test_contentstating_singlewrite(Outputtest *outputtest, gconstpointer test_data)
+test_contentstating_singlewrite(Outputtest *outputtest,
+                                G_GNUC_UNUSED gconstpointer test_data)
 {
     CR_FILE *f;
     int ret;
     cr_ContentStat *stat;
     GError *tmp_err = NULL;
 
-    CR_UNUSED(test_data);
-
     const char *content = "sdlkjowykjnhsadyhfsoaf\nasoiuyseahlndsf\n";
     const int content_len = 39;
     const char *content_sha256 = "c9d112f052ab86270bfb484817a513d6ce188133ddc0"
@@ -677,15 +672,14 @@ test_contentstating_singlewrite(Outputtest *outputtest, gconstpointer test_data)
 }
 
 static void
-test_contentstating_multiwrite(Outputtest *outputtest, gconstpointer test_data)
+test_contentstating_multiwrite(Outputtest *outputtest,
+                               G_GNUC_UNUSED gconstpointer test_data)
 {
     CR_FILE *f;
     int ret;
     cr_ContentStat *stat;
     GError *tmp_err = NULL;
 
-    CR_UNUSED(test_data);
-
     const char *content = "sdlkjowykjnhsadyhfsoaf\nasoiuyseahlndsf\n";
     const int content_len = 39;
     const char *content_sha256 = "c9d112f052ab86270bfb484817a513d6ce188133ddc0"
index cbe08e426e1ec1705cfcd4ad0d258f44792fa57b..79ccc3d8c3c7f2ba1ec8ce2cfa09ef79a20807f8 100644 (file)
@@ -398,9 +398,9 @@ typedef struct {
 
 
 static void
-copyfiletest_setup(Copyfiletest *copyfiletest, gconstpointer test_data)
+copyfiletest_setup(Copyfiletest *copyfiletest,
+                   G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
     copyfiletest->tmp_dir = g_strdup(TMPDIR_TEMPLATE);
     mkdtemp(copyfiletest->tmp_dir);
     copyfiletest->dst_file = g_strconcat(copyfiletest->tmp_dir, "/", DST_FILE, NULL);
@@ -408,9 +408,9 @@ copyfiletest_setup(Copyfiletest *copyfiletest, gconstpointer test_data)
 
 
 static void
-copyfiletest_teardown(Copyfiletest *copyfiletest, gconstpointer test_data)
+copyfiletest_teardown(Copyfiletest *copyfiletest,
+                      G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
     remove(copyfiletest->dst_file);
     rmdir(copyfiletest->tmp_dir);
     g_free(copyfiletest->tmp_dir);
@@ -419,9 +419,9 @@ copyfiletest_teardown(Copyfiletest *copyfiletest, gconstpointer test_data)
 
 
 static void
-copyfiletest_test_empty_file(Copyfiletest *copyfiletest, gconstpointer test_data)
+copyfiletest_test_empty_file(Copyfiletest *copyfiletest,
+                             G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
     gboolean ret;
     char *checksum;
     GError *tmp_err = NULL;
@@ -438,9 +438,9 @@ copyfiletest_test_empty_file(Copyfiletest *copyfiletest, gconstpointer test_data
 
 
 static void
-copyfiletest_test_text_file(Copyfiletest *copyfiletest, gconstpointer test_data)
+copyfiletest_test_text_file(Copyfiletest *copyfiletest,
+                            G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
     gboolean ret;
     char *checksum;
 
@@ -455,9 +455,9 @@ copyfiletest_test_text_file(Copyfiletest *copyfiletest, gconstpointer test_data)
 
 
 static void
-copyfiletest_test_binary_file(Copyfiletest *copyfiletest, gconstpointer test_data)
+copyfiletest_test_binary_file(Copyfiletest *copyfiletest,
+                              G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
     gboolean ret;
     char *checksum;
     GError *tmp_err = NULL;
@@ -474,9 +474,9 @@ copyfiletest_test_binary_file(Copyfiletest *copyfiletest, gconstpointer test_dat
 
 
 static void
-copyfiletest_test_rewrite(Copyfiletest *copyfiletest, gconstpointer test_data)
+copyfiletest_test_rewrite(Copyfiletest *copyfiletest,
+                          G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
     gboolean ret;
     char *checksum;
     GError *tmp_err = NULL;
@@ -500,9 +500,9 @@ copyfiletest_test_rewrite(Copyfiletest *copyfiletest, gconstpointer test_data)
 
 
 static void
-copyfiletest_test_corner_cases(Copyfiletest *copyfiletest, gconstpointer test_data)
+copyfiletest_test_corner_cases(Copyfiletest *copyfiletest,
+                               G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
     gboolean ret;
     GError *tmp_err = NULL;
 
@@ -523,9 +523,9 @@ copyfiletest_test_corner_cases(Copyfiletest *copyfiletest, gconstpointer test_da
 
 
 static void
-compressfile_test_text_file(Copyfiletest *copyfiletest, gconstpointer test_data)
+compressfile_test_text_file(Copyfiletest *copyfiletest,
+                            G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
     int ret;
     char *checksum;
     GError *tmp_err = NULL;
@@ -544,9 +544,8 @@ compressfile_test_text_file(Copyfiletest *copyfiletest, gconstpointer test_data)
 
 static void
 compressfile_with_stat_test_text_file(Copyfiletest *copyfiletest,
-                                      gconstpointer test_data)
+                                      G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
     int ret;
     char *checksum;
     cr_ContentStat *stat;
@@ -570,9 +569,8 @@ compressfile_with_stat_test_text_file(Copyfiletest *copyfiletest,
 
 static void
 decompressfile_with_stat_test_text_file(Copyfiletest *copyfiletest,
-                                        gconstpointer test_data)
+                                        G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
     int ret;
     cr_ContentStat *stat;
     GError *tmp_err = NULL;
@@ -595,10 +593,9 @@ decompressfile_with_stat_test_text_file(Copyfiletest *copyfiletest,
 
 
 static void
-test_cr_download_valid_url_1(Copyfiletest *copyfiletest, gconstpointer test_data)
+test_cr_download_valid_url_1(Copyfiletest *copyfiletest,
+                             G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
-
     CURL *handle = curl_easy_init();
 
     g_assert(!g_file_test(copyfiletest->dst_file, G_FILE_TEST_EXISTS));
@@ -610,10 +607,9 @@ test_cr_download_valid_url_1(Copyfiletest *copyfiletest, gconstpointer test_data
 
 
 static void
-test_cr_download_valid_url_2(Copyfiletest *copyfiletest, gconstpointer test_data)
+test_cr_download_valid_url_2(Copyfiletest *copyfiletest,
+                             G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
-
     CURL *handle = curl_easy_init();
     GError *tmp_err = NULL;
 
@@ -628,10 +624,9 @@ test_cr_download_valid_url_2(Copyfiletest *copyfiletest, gconstpointer test_data
 
 
 static void
-test_cr_download_invalid_url(Copyfiletest *copyfiletest, gconstpointer test_data)
+test_cr_download_invalid_url(Copyfiletest *copyfiletest,
+                             G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
-
     CURL *handle = curl_easy_init();
     GError *tmp_err = NULL;
 
@@ -646,14 +641,13 @@ test_cr_download_invalid_url(Copyfiletest *copyfiletest, gconstpointer test_data
 
 
 static void
-test_cr_better_copy_file_local(Copyfiletest *copyfiletest, gconstpointer test_data)
+test_cr_better_copy_file_local(Copyfiletest *copyfiletest,
+                               G_GNUC_UNUSED gconstpointer test_data)
 {
     gboolean ret;
     char *checksum;
     GError *tmp_err = NULL;
 
-    CR_UNUSED(test_data);
-
     g_assert(!g_file_test(copyfiletest->dst_file, G_FILE_TEST_EXISTS));
     ret = cr_better_copy_file(TEST_BINARY_FILE, copyfiletest->dst_file, &tmp_err);
     g_assert(!tmp_err);
@@ -667,13 +661,12 @@ test_cr_better_copy_file_local(Copyfiletest *copyfiletest, gconstpointer test_da
 
 
 static void
-test_cr_better_copy_file_url(Copyfiletest *copyfiletest, gconstpointer test_data)
+test_cr_better_copy_file_url(Copyfiletest *copyfiletest,
+                             G_GNUC_UNUSED gconstpointer test_data)
 {
     gboolean ret;
     GError *tmp_err = NULL;
 
-    CR_UNUSED(test_data);
-
     g_assert(!g_file_test(copyfiletest->dst_file, G_FILE_TEST_EXISTS));
     ret = cr_better_copy_file(VALID_URL_01, copyfiletest->dst_file, &tmp_err);
     g_assert(!tmp_err);
index d2aa44f7081858c3a809f67f03987439e95f3b33..dba115fc09e156629ef502a748b0308b9aa0b397 100644 (file)
@@ -140,28 +140,27 @@ get_empty_package()
 
 
 static void
-testdata_setup(TestData *testdata, gconstpointer test_data)
+testdata_setup(TestData *testdata,
+               G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
     testdata->tmp_dir = g_strdup(TMP_DIR_PATTERN);
     mkdtemp(testdata->tmp_dir);
 }
 
 
 static void
-testdata_teardown(TestData *testdata, gconstpointer test_data)
+testdata_teardown(TestData *testdata,
+                  G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
     cr_remove_dir(testdata->tmp_dir, NULL);
     g_free(testdata->tmp_dir);
 }
 
 
 static void
-test_cr_open_db(TestData *testdata, gconstpointer test_data)
+test_cr_open_db(TestData *testdata,
+                G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
-
     GError *err = NULL;
     gchar *path = NULL;
     cr_SqliteDb *db;
@@ -198,10 +197,9 @@ test_cr_open_db(TestData *testdata, gconstpointer test_data)
 
 
 static void
-test_cr_db_add_primary_pkg(TestData *testdata, gconstpointer test_data)
+test_cr_db_add_primary_pkg(TestData *testdata,
+                           G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
-
     GError *err = NULL;
     gchar *path;
     cr_SqliteDb *db;
@@ -249,10 +247,9 @@ test_cr_db_add_primary_pkg(TestData *testdata, gconstpointer test_data)
 
 
 static void
-test_cr_db_dbinfo_update(TestData *testdata, gconstpointer test_data)
+test_cr_db_dbinfo_update(TestData *testdata,
+                         G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
-
     GError *err = NULL;
     gchar *path;
     cr_SqliteDb *db;
@@ -296,10 +293,9 @@ test_cr_db_dbinfo_update(TestData *testdata, gconstpointer test_data)
 
 
 static void
-test_all(TestData *testdata, gconstpointer test_data)
+test_all(TestData *testdata,
+         G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
-
     GError *err = NULL;
     gchar *path;
     cr_SqliteDb *db = NULL;
index f7fbf1d383f6c1e02d0120fa904e4a3e8ef8da41..d24cd4ab6e637ec815207d95da7a84883415906e 100644 (file)
@@ -35,9 +35,9 @@ typedef struct {
 
 
 static void
-fixtures_setup(TestFixtures *fixtures, gconstpointer test_data)
+fixtures_setup(TestFixtures *fixtures,
+               G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
     gchar *template = g_strdup(TMPDIR_TEMPLATE);
     fixtures->tmpdir = mkdtemp(template);
     g_assert(fixtures->tmpdir);
@@ -45,10 +45,9 @@ fixtures_setup(TestFixtures *fixtures, gconstpointer test_data)
 
 
 static void
-fixtures_teardown(TestFixtures *fixtures, gconstpointer test_data)
+fixtures_teardown(TestFixtures *fixtures,
+                  G_GNUC_UNUSED gconstpointer test_data)
 {
-    CR_UNUSED(test_data);
-
     if (!fixtures->tmpdir)
         return;
 
@@ -58,7 +57,8 @@ fixtures_teardown(TestFixtures *fixtures, gconstpointer test_data)
 
 
 static void
-test_no_packages(TestFixtures *fixtures, gconstpointer test_data)
+test_no_packages(TestFixtures *fixtures,
+                 G_GNUC_UNUSED gconstpointer test_data)
 {
     cr_XmlFile *f;
     gchar *path;
@@ -66,7 +66,6 @@ test_no_packages(TestFixtures *fixtures, gconstpointer test_data)
     int ret;
     GError *err = NULL;
 
-    CR_UNUSED(test_data);
     g_assert(g_file_test(fixtures->tmpdir, G_FILE_TEST_IS_DIR));
 
     // Try primary.xml
index d7379f542fe0d934e32abbe18ebee15cd0d8fb56..758dd7cdeb26ce6a147455542b9dcbfc2b21fcb2 100644 (file)
@@ -50,16 +50,12 @@ pkgcb_interrupt(cr_Package *pkg, void *cbdata, GError **err)
 
 static int
 newpkgcb_skip_fake_bash(cr_Package **pkg,
-                        const char *pkgId,
+                        G_GNUC_UNUSED const char *pkgId,
                         const char *name,
-                        const char *arch,
-                        void *cbdata,
+                        G_GNUC_UNUSED const char *arch,
+                        G_GNUC_UNUSED void *cbdata,
                         GError **err)
 {
-    CR_UNUSED(pkgId);
-    CR_UNUSED(arch);
-    CR_UNUSED(cbdata);
-
     g_assert(pkg != NULL);
     g_assert(*pkg == NULL);
     g_assert(pkgId != NULL);
@@ -74,17 +70,12 @@ newpkgcb_skip_fake_bash(cr_Package **pkg,
 
 static int
 newpkgcb_interrupt(cr_Package **pkg,
-                   const char *pkgId,
-                   const char *name,
-                   const char *arch,
-                   void *cbdata,
+                   G_GNUC_UNUSED const char *pkgId,
+                   G_GNUC_UNUSED const char *name,
+                   G_GNUC_UNUSED const char *arch,
+                   G_GNUC_UNUSED void *cbdata,
                    GError **err)
 {
-    CR_UNUSED(pkgId);
-    CR_UNUSED(name);
-    CR_UNUSED(arch);
-    CR_UNUSED(cbdata);
-
     g_assert(pkg != NULL);
     g_assert(*pkg == NULL);
     g_assert(pkgId != NULL);
@@ -96,15 +87,11 @@ newpkgcb_interrupt(cr_Package **pkg,
 }
 
 static int
-warningcb(cr_XmlParserWarningType type,
-                    char *msg,
-                    void *cbdata,
-                    GError **err)
+warningcb(G_GNUC_UNUSED cr_XmlParserWarningType type,
+          G_GNUC_UNUSED char *msg,
+          void *cbdata,
+          G_GNUC_UNUSED GError **err)
 {
-    CR_UNUSED(type);
-    CR_UNUSED(msg);
-    CR_UNUSED(err);
-
     g_assert(type < CR_XML_WARNING_SENTINEL);
     g_assert(!err || *err == NULL);
 
@@ -115,16 +102,11 @@ warningcb(cr_XmlParserWarningType type,
 }
 
 static int
-warningcb_interrupt(cr_XmlParserWarningType type,
-                    char *msg,
-                    void *cbdata,
-                    GError **err)
+warningcb_interrupt(G_GNUC_UNUSED cr_XmlParserWarningType type,
+                    G_GNUC_UNUSED char *msg,
+                    G_GNUC_UNUSED void *cbdata,
+                    G_GNUC_UNUSED GError **err)
 {
-    CR_UNUSED(type);
-    CR_UNUSED(msg);
-    CR_UNUSED(cbdata);
-    CR_UNUSED(err);
-
     g_assert(type < CR_XML_WARNING_SENTINEL);
     g_assert(!err || *err == NULL);
 
index 6cd1346bac565168d33c424d6a0aa97e13344195..fa425e912d51239ca85b078874b30c7aba824064 100644 (file)
 // Callbacks
 
 static int
-warningcb(cr_XmlParserWarningType type,
-                    char *msg,
-                    void *cbdata,
-                    GError **err)
+warningcb(G_GNUC_UNUSED cr_XmlParserWarningType type,
+          G_GNUC_UNUSED char *msg,
+          void *cbdata,
+          G_GNUC_UNUSED GError **err)
 {
-    CR_UNUSED(type);
-    CR_UNUSED(msg);
-    CR_UNUSED(err);
-
     g_assert(type < CR_XML_WARNING_SENTINEL);
     g_assert(!err || *err == NULL);
 
@@ -48,16 +44,11 @@ warningcb(cr_XmlParserWarningType type,
 }
 
 static int
-warningcb_interrupt(cr_XmlParserWarningType type,
-                    char *msg,
-                    void *cbdata,
-                    GError **err)
+warningcb_interrupt(G_GNUC_UNUSED cr_XmlParserWarningType type,
+                    G_GNUC_UNUSED char *msg,
+                    G_GNUC_UNUSED void *cbdata,
+                    G_GNUC_UNUSED GError **err)
 {
-    CR_UNUSED(type);
-    CR_UNUSED(msg);
-    CR_UNUSED(cbdata);
-    CR_UNUSED(err);
-
     g_assert(type < CR_XML_WARNING_SENTINEL);
     g_assert(!err || *err == NULL);