[easytag/wip/musicbrainz-support-merge: 149/149] Fix format string warnings



commit 926db8132283cb92d5d8bd384b85a6691b168f90
Author: David King <amigadave amigadave com>
Date:   Wed Aug 27 21:11:44 2014 +0100

    Fix format string warnings

 src/mb_search.c          |   14 +++++++-------
 src/musicbrainz_dialog.c |   13 ++++++-------
 2 files changed, 13 insertions(+), 14 deletions(-)
---
diff --git a/src/mb_search.c b/src/mb_search.c
index e57abe9..c5dfd4b 100644
--- a/src/mb_search.c
+++ b/src/mb_search.c
@@ -589,32 +589,32 @@ et_musicbrainz_set_error_from_query (Mb5Query query, tQueryResult result,
     {
         case eQuery_ConnectionError:
             g_set_error (error, ET_MB5_SEARCH_ERROR,
-                         ET_MB5_SEARCH_ERROR_CONNECTION, error_message);
+                         ET_MB5_SEARCH_ERROR_CONNECTION, "%s", error_message);
             break;
 
         case eQuery_Timeout:
             g_set_error (error, ET_MB5_SEARCH_ERROR,
-                         ET_MB5_SEARCH_ERROR_TIMEOUT, error_message);
+                         ET_MB5_SEARCH_ERROR_TIMEOUT, "%s", error_message);
             break;
 
         case eQuery_AuthenticationError:
             g_set_error (error, ET_MB5_SEARCH_ERROR,
-                         ET_MB5_SEARCH_ERROR_AUTHENTICATION, error_message);
+                         ET_MB5_SEARCH_ERROR_AUTHENTICATION, "%s",
+                         error_message);
             break;
 
         case eQuery_FetchError:
-            g_set_error (error, ET_MB5_SEARCH_ERROR,
-                         ET_MB5_SEARCH_ERROR_FETCH, error_message);
+            g_set_error (error, ET_MB5_SEARCH_ERROR, ET_MB5_SEARCH_ERROR_FETCH,                          
"%s", error_message);
             break;
  
         case eQuery_RequestError:
             g_set_error (error, ET_MB5_SEARCH_ERROR,
-                         ET_MB5_SEARCH_ERROR_REQUEST, error_message);
+                         ET_MB5_SEARCH_ERROR_REQUEST, "%s", error_message);
             break;
  
         case eQuery_ResourceNotFound:
             g_set_error (error, ET_MB5_SEARCH_ERROR,
-                         ET_MB5_SEARCH_ERROR_RESOURCE_NOT_FOUND,
+                         ET_MB5_SEARCH_ERROR_RESOURCE_NOT_FOUND, "%s",
                          error_message);
             break;
 
diff --git a/src/musicbrainz_dialog.c b/src/musicbrainz_dialog.c
index e9d8c8d..ce721cd 100644
--- a/src/musicbrainz_dialog.c
+++ b/src/musicbrainz_dialog.c
@@ -532,7 +532,7 @@ manual_search_thread_func (GSimpleAsyncResult *res, GObject *obj,
     if (g_cancellable_is_cancelled (cancellable))
     {
         g_set_error (&error, ET_MB5_SEARCH_ERROR,
-                     ET_MB5_SEARCH_ERROR_CANCELLED,
+                     ET_MB5_SEARCH_ERROR_CANCELLED, "%s",
                      _("Operation cancelled by user"));
         g_simple_async_report_gerror_in_idle (NULL,
                                               mb5_search_error_callback,
@@ -549,7 +549,7 @@ manual_search_thread_func (GSimpleAsyncResult *res, GObject *obj,
     if (g_cancellable_is_cancelled (cancellable))
     {
         g_set_error (&error, ET_MB5_SEARCH_ERROR,
-                     ET_MB5_SEARCH_ERROR_CANCELLED,
+                     ET_MB5_SEARCH_ERROR_CANCELLED, "%s",
                      _("Operation cancelled by user"));
         g_simple_async_report_gerror_in_idle (NULL,
                                               mb5_search_error_callback,
@@ -572,7 +572,7 @@ manual_search_thread_func (GSimpleAsyncResult *res, GObject *obj,
     if (g_cancellable_is_cancelled (cancellable))
     {
         g_set_error (&error, ET_MB5_SEARCH_ERROR,
-                     ET_MB5_SEARCH_ERROR_CANCELLED,
+                     ET_MB5_SEARCH_ERROR_CANCELLED, "%s",
                      _("Operation cancelled by user"));
         g_simple_async_report_gerror_in_idle (NULL,
                                               mb5_search_error_callback,
@@ -1261,9 +1261,8 @@ discid_search_thread_func (GSimpleAsyncResult *res, GObject *obj,
     if (!discid_read_sparse (disc, discid_get_default_device (), 0))
     {
         /* Error reading disc */
-        g_set_error (&error, ET_MB5_SEARCH_ERROR,
-                     ET_MB5_SEARCH_ERROR_DISCID,
-                     discid_get_error_msg (disc));
+        g_set_error (&error, ET_MB5_SEARCH_ERROR, ET_MB5_SEARCH_ERROR_DISCID,
+                     "%s", discid_get_error_msg (disc));
         g_simple_async_report_gerror_in_idle (NULL,
                                               mb5_search_error_callback,
                                               NULL, error);
@@ -1275,7 +1274,7 @@ discid_search_thread_func (GSimpleAsyncResult *res, GObject *obj,
     if (g_cancellable_is_cancelled (cancellable))
     {
         g_set_error (&error, ET_MB5_SEARCH_ERROR,
-                     ET_MB5_SEARCH_ERROR_CANCELLED,
+                     ET_MB5_SEARCH_ERROR_CANCELLED, "%s",
                      _("Operation cancelled by user"));
         g_simple_async_report_gerror_in_idle (NULL,
                                               mb5_search_error_callback,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]