* @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);
* @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);
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
}
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);
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;
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) {
}
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);
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);
}
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;
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));
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;
}
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);
}
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;
* @{
*/
-/** 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]))
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();
#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;
}
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;
*/
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;
}
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;
}
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;
/* 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;
}
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;
PyObject *py_stat, *ret;
cr_ContentStat *stat;
- CR_UNUSED(kwds);
-
if (!PyArg_ParseTuple(args, "siiO|:crfile_init",
&path, &mode, &comtype, &py_stat))
return -1;
"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;
/* 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;
" :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;
}
static PyObject *
-contentstat_repr(_ContentStatObject *self)
+contentstat_repr(G_GNUC_UNUSED _ContentStatObject *self)
{
- CR_UNUSED(self);
return PyString_FromFormat("<createrepo_c.ContentStat object>");
}
/* 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;
}
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);
"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;
"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;
/* 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;
" 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;
}
static PyObject *
-metadatalocation_repr(_MetadataLocationObject *self)
+metadatalocation_repr(G_GNUC_UNUSED _MetadataLocationObject *self)
{
- CR_UNUSED(self);
return PyString_FromFormat("<createrepo_c.MetadataLocation object>");
}
#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;
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;
}
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;
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;
/* 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;
"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;
"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;
"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);
#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;
}
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;
/* 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;
"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);
}
static PyObject *
-repomd_repr(_RepomdObject *self)
+repomd_repr(G_GNUC_UNUSED _RepomdObject *self)
{
- CR_UNUSED(self);
return PyString_FromFormat("<createrepo_c.Repomd object>");
}
"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;
}
"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);
/* 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;
" :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))
}
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);
"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));
"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);
/* 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;
" :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;
"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;
/* 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;
".. 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);
}
static PyObject *
-updatecollection_repr(_UpdateCollectionObject *self)
+updatecollection_repr(G_GNUC_UNUSED _UpdateCollectionObject *self)
{
- CR_UNUSED(self);
return PyString_FromFormat("<createrepo_c.UpdateCollection object>");
}
"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));
/* 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;
".. 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);
}
static PyObject *
-updatecollectionpackage_repr(_UpdateCollectionPackageObject *self)
+updatecollectionpackage_repr(G_GNUC_UNUSED _UpdateCollectionPackageObject *self)
{
- CR_UNUSED(self);
return PyString_FromFormat("<createrepo_c.UpdateCollectionPackage object>");
}
"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));
/* 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;
"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);
}
static PyObject *
-updateinfo_repr(_UpdateInfoObject *self)
+updateinfo_repr(G_GNUC_UNUSED _UpdateInfoObject *self)
{
- CR_UNUSED(self);
return PyString_FromFormat("<createrepo_c.UpdateInfo object>");
}
"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);
/* 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;
".. 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);
}
static PyObject *
-updaterecord_repr(_UpdateRecordObject *self)
+updaterecord_repr(G_GNUC_UNUSED _UpdateRecordObject *self)
{
- CR_UNUSED(self);
return PyString_FromFormat("<createrepo_c.UpdateRecord object>");
}
"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));
/* 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;
".. 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);
}
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);
"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));
#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;
}
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;
}
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;
}
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;
}
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;
/* 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;
" :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;
PyObject *py_stat, *ret;
cr_ContentStat *stat;
- CR_UNUSED(kwds);
-
if (!PyArg_ParseTuple(args, "siiO|:xmlfile_init",
&path, &type, &comtype, &py_stat))
return -1;
"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;
}
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;
}
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;
}
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;
}
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;
}
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;
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
}
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)
}
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);
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);
}
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
}
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
}
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
}
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
}
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
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);
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);
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,
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"
}
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"
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);
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);
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;
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;
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;
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;
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;
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;
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;
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;
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));
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;
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;
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);
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);
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;
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;
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;
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;
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);
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;
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;
int ret;
GError *err = NULL;
- CR_UNUSED(test_data);
g_assert(g_file_test(fixtures->tmpdir, G_FILE_TEST_IS_DIR));
// Try primary.xml
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);
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);
}
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);
}
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);
// 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);
}
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);