Skip to content

Commit

Permalink
Examples: Fix warning: ‘log_handler_cb’ defined but not used
Browse files Browse the repository at this point in the history
  • Loading branch information
jrohel authored and jan-kolarik committed Jun 10, 2024
1 parent 81fe43d commit f52b14f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions examples/c/download_low_level_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,11 @@ main(void)
GError *tmp_err = NULL;

// Setup logging (optional step)

/*
g_log_set_handler("librepo", G_LOG_LEVEL_ERROR |
G_LOG_LEVEL_CRITICAL |
G_LOG_LEVEL_DEBUG |
G_LOG_LEVEL_WARNING,
log_handler_cb, NULL);
*/

// Download something
GSList *possible_checksums = NULL;
Expand Down
2 changes: 2 additions & 0 deletions examples/c/download_repo_with_callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define FEDORA_VERSION "19"
#define FEDORA_BASEARCH "x86_64"

/* Logging handler. Uncomment if want to use it.
static void
log_handler_cb(const gchar *log_domain G_GNUC_UNUSED,
GLogLevelFlags log_level G_GNUC_UNUSED,
Expand All @@ -14,6 +15,7 @@ log_handler_cb(const gchar *log_domain G_GNUC_UNUSED,
{
g_print ("%s\n", message);
}
*/

static int
progress_callback(G_GNUC_UNUSED void *data,
Expand Down
2 changes: 2 additions & 0 deletions examples/c/fastestmirror_with_callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <stdio.h>
#include <librepo/librepo.h>

/* Logging handler. Uncomment if want to use it.
static void
log_handler_cb(const gchar *log_domain G_GNUC_UNUSED,
GLogLevelFlags log_level G_GNUC_UNUSED,
Expand All @@ -11,6 +12,7 @@ log_handler_cb(const gchar *log_domain G_GNUC_UNUSED,
{
g_print ("%s\n", message);
}
*/

static void
cb(G_GNUC_UNUSED void *clientp, LrFastestMirrorStages stage, void *ptr)
Expand Down

0 comments on commit f52b14f

Please sign in to comment.