From ca3236e8c3d2aa9cfc8ba36ea682395411826ef2 Mon Sep 17 00:00:00 2001 From: Jaroslav Rohel Date: Tue, 4 Jun 2024 08:13:38 +0200 Subject: [PATCH] =?UTF-8?q?Examples:=20Fix=20warning:=20=E2=80=98log=5Fhan?= =?UTF-8?q?dler=5Fcb=E2=80=99=20defined=20but=20not=20used?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/c/download_low_level_api.c | 3 --- examples/c/download_repo_with_callback.c | 2 ++ examples/c/fastestmirror_with_callback.c | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/c/download_low_level_api.c b/examples/c/download_low_level_api.c index 840bdc1be..cc40d253a 100644 --- a/examples/c/download_low_level_api.c +++ b/examples/c/download_low_level_api.c @@ -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; diff --git a/examples/c/download_repo_with_callback.c b/examples/c/download_repo_with_callback.c index b6b21ae6b..fca97f840 100644 --- a/examples/c/download_repo_with_callback.c +++ b/examples/c/download_repo_with_callback.c @@ -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, @@ -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, diff --git a/examples/c/fastestmirror_with_callback.c b/examples/c/fastestmirror_with_callback.c index c3011c143..0b0aea730 100644 --- a/examples/c/fastestmirror_with_callback.c +++ b/examples/c/fastestmirror_with_callback.c @@ -3,6 +3,7 @@ #include #include +/* 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, @@ -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)