[easytag/wip/ax-compile-warnings: 3/11] Avoid shadowed variable warnings



commit aa3c8bfbe6d2a0637ff41ccb24f51edd85304f6f
Author: David King <amigadave amigadave com>
Date:   Fri Jan 30 13:43:57 2015 +0000

    Avoid shadowed variable warnings

 src/application_window.c       |    5 -----
 src/cddb_dialog.c              |    6 +++---
 src/charset.c                  |    4 ++--
 src/easytag.c                  |    9 ++++-----
 src/file.c                     |   18 +++++++++---------
 src/file_list.c                |    8 ++++----
 src/log.c                      |    1 -
 src/playlist_dialog.c          |    1 -
 src/scan_dialog.c              |   15 +++++++++------
 src/tags/gio_wrapper.cc        |   20 ++++++++++----------
 src/tags/id3_tag.c             |   14 ++++----------
 src/tags/id3v24_tag.c          |    6 +++---
 src/tags/libapetag/apetaglib.c |    6 +++---
 src/tags/mp4_tag.cc            |    7 +++----
 src/tags/ogg_tag.c             |   28 +++++++++++++++-------------
 src/tags/vcedit.c              |    4 +---
 16 files changed, 70 insertions(+), 82 deletions(-)
---
diff --git a/src/application_window.c b/src/application_window.c
index ea27c72..ef44a23 100644
--- a/src/application_window.c
+++ b/src/application_window.c
@@ -738,11 +738,6 @@ on_select_all (GSimpleAction *action,
                                                  focused))
     /* Assume that other widgets should select all in the file view. */
     {
-        EtApplicationWindowPrivate *priv;
-        EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
-
-        priv = et_application_window_get_instance_private (self);
-
         /* Save the current displayed data */
         ET_Save_File_Data_From_UI (ETCore->ETFileDisplayed);
 
diff --git a/src/cddb_dialog.c b/src/cddb_dialog.c
index b117628..39da5f6 100644
--- a/src/cddb_dialog.c
+++ b/src/cddb_dialog.c
@@ -979,7 +979,7 @@ Cddb_Get_Album_Tracks_List (EtCDDBDialog *self, GtkTreeSelection* selection)
                        // For gnudb (don't check CDDB header)
                        if ( Cddb_Read_Http_Header(&file,&cddb_out) <= 0 )
                    {
-                       gchar *msg = g_strdup_printf (_("The server returned a bad response ‘%s’"),
+                       msg = g_strdup_printf (_("The server returned a bad response ‘%s’"),
                                                       cddb_out);
                        gtk_statusbar_push(GTK_STATUSBAR(priv->status_bar),priv->status_bar_context,msg);
                        Log_Print(LOG_ERROR,"%s",msg);
@@ -994,7 +994,7 @@ Cddb_Get_Album_Tracks_List (EtCDDBDialog *self, GtkTreeSelection* selection)
             /* For freedb. */
             if (Cddb_Read_Http_Header (&file, &cddb_out) <= 0)
             {
-                gchar *msg = g_strdup_printf (_("The server returned a bad response ‘%s’"),
+                msg = g_strdup_printf (_("The server returned a bad response ‘%s’"),
                                                       cddb_out);
                 gtk_statusbar_push (GTK_STATUSBAR (priv->status_bar),
                                     priv->status_bar_context, msg);
@@ -1015,7 +1015,7 @@ Cddb_Get_Album_Tracks_List (EtCDDBDialog *self, GtkTreeSelection* selection)
 
             if (Cddb_Read_Cddb_Header (&file, &cddb_out) <= 0)
             {
-                gchar *msg = g_strdup_printf (_("The server returned a bad response ‘%s’"),
+                msg = g_strdup_printf (_("The server returned a bad response ‘%s’"),
                                                       cddb_out);
                 gtk_statusbar_push (GTK_STATUSBAR (priv->status_bar),
                                     priv->status_bar_context, msg);
diff --git a/src/charset.c b/src/charset.c
index 4ad9c77..1c54bad 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -151,7 +151,7 @@ check_locale (const char *locale)
 
 /* stolen from gnome-desktop-item.c */
 G_GNUC_NULL_TERMINATED static void
-insert_locales (GHashTable *encodings, const gchar *enc, ...)
+insert_locales (GHashTable *encs, const gchar *enc, ...)
 {
     va_list args;
     char *s;
@@ -164,7 +164,7 @@ insert_locales (GHashTable *encodings, const gchar *enc, ...)
             break;
         /* A GDestroyNotify is not passed, so casting away the const is
          * safe, as the key is never freed. */
-        g_hash_table_insert (encodings, s, (gpointer)enc);
+        g_hash_table_insert (encs, s, (gpointer)enc);
     }
     va_end (args);
 }
diff --git a/src/easytag.c b/src/easytag.c
index 81442eb..8b28ffc 100644
--- a/src/easytag.c
+++ b/src/easytag.c
@@ -183,15 +183,16 @@ Save_List_Of_Files (GList *etfilelist, gboolean force_saving_files)
         GFileInfo *fileinfo;
 
         const ET_File *ETFile = (ET_File *)l->data;
-        const File_Tag  *FileTag  = (File_Tag *)ETFile->FileTag->data;
+        const File_Tag *file_tag  = (File_Tag *)ETFile->FileTag->data;
         const File_Name *FileName = (File_Name *)ETFile->FileNameNew->data;
         const gchar *filename_cur = ((File_Name *)ETFile->FileNameCur->data)->value;
         const gchar *filename_cur_utf8 = ((File_Name *)ETFile->FileNameCur->data)->value_utf8;
         gchar *basename_cur_utf8 = g_path_get_basename(filename_cur_utf8);
 
         // Count only the changed files or all files if force_saving_files==TRUE
-        if ( force_saving_files
-        || (FileName && FileName->saved==FALSE) || (FileTag && FileTag->saved==FALSE) )
+        if (force_saving_files
+            || (FileName && FileName->saved == FALSE)
+            || (file_tag && file_tag->saved == FALSE))
             nb_files_to_save++;
 
         file = g_file_new_for_path (filename_cur);
@@ -646,8 +647,6 @@ Save_File (ET_File *ETFile, gboolean multiple_files,
                 {
                     if (!SF_HideMsgbox_Rename_File)
                     {
-                        GtkWidget *msgdialog;
-
                         msgdialog = gtk_message_dialog_new (GTK_WINDOW (MainWindow),
                                                             GTK_DIALOG_MODAL | 
GTK_DIALOG_DESTROY_WITH_PARENT,
                                                             GTK_MESSAGE_ERROR,
diff --git a/src/file.c b/src/file.c
index 8a93441..f7f1a2b 100644
--- a/src/file.c
+++ b/src/file.c
@@ -1199,7 +1199,7 @@ void
 ET_Display_File_Data_To_UI (ET_File *ETFile)
 {
     EtApplicationWindow *window;
-    const ET_File_Description *ETFileDescription;
+    const ET_File_Description *description;
     const gchar *cur_filename_utf8;
     gchar *msg;
     EtFileHeaderFields *fields;
@@ -1209,7 +1209,7 @@ ET_Display_File_Data_To_UI (ET_File *ETFile)
                       /* For the case where ETFile is an "empty" structure. */
 
     cur_filename_utf8 = ((File_Name *)((GList *)ETFile->FileNameCur)->data)->value_utf8;
-    ETFileDescription = ETFile->ETFileDescription;
+    description = ETFile->ETFileDescription;
 
     /* Save the current displayed file */
     ETCore->ETFileDisplayed = ETFile;
@@ -1229,7 +1229,7 @@ ET_Display_File_Data_To_UI (ET_File *ETFile)
     et_application_window_tag_area_display_controls (window, ETFile);
 
     /* Display file data, header data and file type */
-    switch (ETFileDescription->FileType)
+    switch (description->FileType)
     {
 #if defined ENABLE_MP3 && defined ENABLE_ID3LIB
         case MP3_FILE:
@@ -1394,7 +1394,7 @@ ET_Display_File_Info_To_UI (const ET_File *ETFile)
  */
 void ET_Save_File_Data_From_UI (ET_File *ETFile)
 {
-    const ET_File_Description *ETFileDescription;
+    const ET_File_Description *description;
     File_Name *FileName;
     File_Tag  *FileTag;
     guint      undo_key;
@@ -1404,7 +1404,7 @@ void ET_Save_File_Data_From_UI (ET_File *ETFile)
                       && ETFile->FileNameCur->data != NULL);
 
     cur_filename_utf8 = ((File_Name *)((GList *)ETFile->FileNameCur)->data)->value_utf8;
-    ETFileDescription = ETFile->ETFileDescription;
+    description = ETFile->ETFileDescription;
     undo_key = ET_Undo_Key_New();
 
 
@@ -1416,7 +1416,7 @@ void ET_Save_File_Data_From_UI (ET_File *ETFile)
     FileName->key = undo_key;
     ET_Save_File_Name_From_UI(ETFile,FileName); // Used for all files!
 
-    switch (ETFileDescription->TagType)
+    switch (description->TagType)
     {
 #ifdef ENABLE_MP3
         case ID3_TAG:
@@ -1826,7 +1826,7 @@ ET_Save_File_Tag_Internal (ET_File *ETFile, File_Tag *FileTag)
 gboolean
 ET_Save_File_Tag_To_HD (ET_File *ETFile, GError **error)
 {
-    const ET_File_Description *ETFileDescription;
+    const ET_File_Description *description;
     const gchar *cur_filename;
     const gchar *cur_filename_utf8;
     gboolean state;
@@ -1839,14 +1839,14 @@ ET_Save_File_Tag_To_HD (ET_File *ETFile, GError **error)
     cur_filename = ((File_Name *)(ETFile->FileNameCur)->data)->value;
     cur_filename_utf8 = ((File_Name *)(ETFile->FileNameCur)->data)->value_utf8;
 
-    ETFileDescription = ETFile->ETFileDescription;
+    description = ETFile->ETFileDescription;
 
     /* Store the file timestamps (in case they are to be preserved) */
     file = g_file_new_for_path (cur_filename);
     fileinfo = g_file_query_info (file, "time::*", G_FILE_QUERY_INFO_NONE,
                                   NULL, NULL);
 
-    switch (ETFileDescription->TagType)
+    switch (description->TagType)
     {
 #ifdef ENABLE_MP3
         case ID3_TAG:
diff --git a/src/file_list.c b/src/file_list.c
index badf2f5..153d3c7 100644
--- a/src/file_list.c
+++ b/src/file_list.c
@@ -212,7 +212,7 @@ et_core_read_file_info (GFile *file,
 GList *
 ET_Add_File_To_File_List (gchar *filename)
 {
-    const ET_File_Description *ETFileDescription;
+    const ET_File_Description *description;
     ET_File      *ETFile;
     File_Name    *FileName;
     File_Tag     *FileTag;
@@ -236,7 +236,7 @@ ET_Add_File_To_File_List (gchar *filename)
     ETFileKey = ET_File_Key_New();
 
     /* Get description of the file */
-    ETFileDescription = ET_Get_File_Description(filename);
+    description = ET_Get_File_Description (filename);
 
     /* Get real extension of the file (keeping the case) */
     ETFileExtension = g_strdup(ET_Get_File_Extension(filename));
@@ -258,7 +258,7 @@ ET_Add_File_To_File_List (gchar *filename)
      * it is written as 'Title=' in the file */
     setlocale(LC_CTYPE, "C");
 
-    switch (ETFileDescription->TagType)
+    switch (description->TagType)
     {
 #ifdef ENABLE_MP3
         case ID3_TAG:
@@ -352,7 +352,7 @@ ET_Add_File_To_File_List (gchar *filename)
     /* Fill the ET_File_Info structure */
     ETFileInfo = ET_File_Info_Item_New ();
 
-    switch (ETFileDescription->FileType)
+    switch (description->FileType)
     {
 #if defined ENABLE_MP3 && defined ENABLE_ID3LIB
         case MP3_FILE:
diff --git a/src/log.c b/src/log.c
index 07b67d6..324213b 100644
--- a/src/log.c
+++ b/src/log.c
@@ -367,7 +367,6 @@ Log_Print (EtLogAreaKind error_type, const gchar * const format, ...)
 
     if (file_ostream)
     {
-        gchar *time;
         GString *data;
         gsize bytes_written;
 
diff --git a/src/playlist_dialog.c b/src/playlist_dialog.c
index 43dd1eb..40e95f5 100644
--- a/src/playlist_dialog.c
+++ b/src/playlist_dialog.c
@@ -439,7 +439,6 @@ write_button_clicked (EtPlaylistDialog *self)
     /* Build the playlist filename. */
     if (g_settings_get_boolean (MainSettings, "playlist-use-mask"))
     {
-        gchar *playlist_name;
         EtConvertSpaces convert_mode;
 
         if (!ETCore->ETFileList)
diff --git a/src/scan_dialog.c b/src/scan_dialog.c
index 989afbc..e57e179 100644
--- a/src/scan_dialog.c
+++ b/src/scan_dialog.c
@@ -1007,20 +1007,22 @@ et_scan_generate_new_filename_from_mask (const ET_File *ETFile,
     for (l = g_list_last (rename_file_list); l != NULL;
          l = g_list_previous (l))
     {
-        File_Mask_Item *mask_item = l->data;
+        File_Mask_Item *mask_item2 = l->data;
 
-        if ( mask_item->type==TRAILING_SEPARATOR ) // Trailing characters of mask
+        /* Trailing mask characters. */
+        if (mask_item2->type == TRAILING_SEPARATOR)
         {
             // Doesn't write it if previous field is empty
             if (l->prev
                 && ((File_Mask_Item *)l->prev->data)->type != EMPTY_FIELD)
             {
                 filename_tmp = filename_new_utf8;
-                filename_new_utf8 = g_strconcat(mask_item->string,filename_new_utf8,NULL);
+                filename_new_utf8 = g_strconcat (mask_item2->string,
+                                                 filename_new_utf8, NULL);
                 g_free(filename_tmp);
             }
-        }else
-        if ( mask_item->type==EMPTY_FIELD )
+        }
+        else if (mask_item2->type == EMPTY_FIELD)
         // We don't concatenate the field value (empty) and the previous
         // separator (except leading separator) to the filename.
         // If the empty field is the 'first', we don't concatenate it, and the
@@ -1058,7 +1060,8 @@ et_scan_generate_new_filename_from_mask (const ET_File *ETFile,
         }else // SEPARATOR, FIELD, LEADING_SEPARATOR, DIRECTORY_SEPARATOR
         {
             filename_tmp = filename_new_utf8;
-            filename_new_utf8 = g_strconcat(mask_item->string,filename_new_utf8,NULL);
+            filename_new_utf8 = g_strconcat (mask_item2->string,
+                                             filename_new_utf8, NULL);
             g_free(filename_tmp);
         }
     }
diff --git a/src/tags/gio_wrapper.cc b/src/tags/gio_wrapper.cc
index a560577..234e217 100644
--- a/src/tags/gio_wrapper.cc
+++ b/src/tags/gio_wrapper.cc
@@ -47,17 +47,17 @@ GIO_InputStream::name () const
 }
 
 TagLib::ByteVector
-GIO_InputStream::readBlock (TagLib::ulong length)
+GIO_InputStream::readBlock (TagLib::ulong len)
 {
     if (error)
     {
         return TagLib::ByteVector::null;
     }
 
-    TagLib::ByteVector rv (length, 0);
+    TagLib::ByteVector rv (len, 0);
     gsize bytes;
     g_input_stream_read_all (G_INPUT_STREAM (stream), (void *)rv.data (),
-                             length, &bytes, NULL, &error);
+                             len, &bytes, NULL, &error);
 
     return rv.resize (bytes);
 }
@@ -77,7 +77,7 @@ GIO_InputStream::insert (TagLib::ByteVector const &data,
 }
 
 void
-GIO_InputStream::removeBlock (TagLib::ulong start, TagLib::ulong length)
+GIO_InputStream::removeBlock (TagLib::ulong start, TagLib::ulong len)
 {
     g_warning ("%s", "Trying to write to read-only file!");
 }
@@ -161,7 +161,7 @@ GIO_InputStream::length ()
 }
 
 void
-GIO_InputStream::truncate (long int length)
+GIO_InputStream::truncate (long int len)
 {
     g_warning ("%s", "Trying to truncate read-only file");
 }
@@ -200,7 +200,7 @@ GIO_IOStream::name () const
 }
 
 TagLib::ByteVector
-GIO_IOStream::readBlock (TagLib::ulong length)
+GIO_IOStream::readBlock (TagLib::ulong len)
 {
     if (error)
     {
@@ -208,10 +208,10 @@ GIO_IOStream::readBlock (TagLib::ulong length)
     }
 
     gsize bytes = 0;
-    TagLib::ByteVector rv (length, 0);
+    TagLib::ByteVector rv (len, 0);
     GInputStream *istream = g_io_stream_get_input_stream (G_IO_STREAM (stream));
     g_input_stream_read_all (istream,
-                             (void *)rv.data (), length,
+                             (void *)rv.data (), len,
                              &bytes,
                              NULL, &error);
 
@@ -459,14 +459,14 @@ GIO_IOStream::length ()
 }
 
 void
-GIO_IOStream::truncate (long int length)
+GIO_IOStream::truncate (long int len)
 {
     if (error)
     {
         return;
     }
 
-    g_seekable_truncate (G_SEEKABLE (stream), length, NULL, &error);
+    g_seekable_truncate (G_SEEKABLE (stream), len, NULL, &error);
 }
 
 const GError *GIO_IOStream::getError () const
diff --git a/src/tags/id3_tag.c b/src/tags/id3_tag.c
index 49f50e9..a7e6cf2 100644
--- a/src/tags/id3_tag.c
+++ b/src/tags/id3_tag.c
@@ -200,23 +200,23 @@ id3tag_write_file_v23tag (const ET_File *ETFile,
     {
         GtkWidget *msgdialog;
         gchar *basename;
-        gchar *basename_utf8;
+        gchar *utf8_basename;
 
         basename = g_file_get_basename (file);
-        basename_utf8 = filename_to_display (basename);
+        utf8_basename = filename_to_display (basename);
 
         msgdialog = gtk_message_dialog_new (GTK_WINDOW (MainWindow),
                                             GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
                                             GTK_MESSAGE_ERROR,
                                             GTK_BUTTONS_CLOSE,
                                             _("As the following corrupted file ‘%s’ will cause an error in 
id3lib, it will not be processed"),
-                                            basename_utf8);
+                                            utf8_basename);
         gtk_window_set_title (GTK_WINDOW (msgdialog), _("Corrupted file"));
 
         gtk_dialog_run (GTK_DIALOG (msgdialog));
         gtk_widget_destroy (msgdialog);
         g_free (basename);
-        g_free (basename_utf8);
+        g_free (utf8_basename);
         g_object_unref (file);
         return FALSE;
     }
@@ -989,15 +989,9 @@ gchar *Id3tag_Get_Field (const ID3Frame *id3_frame, ID3_FieldID id3_fieldid)
                 }
                 else if (ID3Field_IsEncodable (id3_field))
                 {
-                    gint id3v1v2_charset;
-                    const gchar *charset;
-
                     string = g_malloc0 (ID3V2_MAX_STRING_LEN + 1);
                     num_chars = ID3Field_GetASCII_1 (id3_field, string,
                                                      ID3V2_MAX_STRING_LEN, 0);
-                    id3v1v2_charset = g_settings_get_enum (MainSettings,
-                                                           "id3v1v2-charset");
-                    charset = et_charset_get_name_from_index (id3v1v2_charset);
                     string1 = convert_string (string, charset, "UTF-8", FALSE);
                     /* Override to a non-standard character encoding. */
                     goto out;
diff --git a/src/tags/id3v24_tag.c b/src/tags/id3v24_tag.c
index 1a0679f..9534b00 100644
--- a/src/tags/id3v24_tag.c
+++ b/src/tags/id3v24_tag.c
@@ -615,9 +615,9 @@ etag_guess_byteorder(const id3_ucs4_t *ustr, gchar **ret) /* XXX */
     }
     else
     {
-        const gchar *tmp;
-        g_get_charset (&tmp);
-        charset = g_strdup (tmp);
+        const gchar *temp;
+        g_get_charset (&temp);
+        charset = g_strdup (temp);
     }
 
     if (!charset)
diff --git a/src/tags/libapetag/apetaglib.c b/src/tags/libapetag/apetaglib.c
index aeceef5..2f407e0 100644
--- a/src/tags/libapetag/apetaglib.c
+++ b/src/tags/libapetag/apetaglib.c
@@ -754,7 +754,7 @@ apetag_read_fp(apetag *mem_cnt, FILE * fp, const char *filename, int flag)
         
         for (p = buff; p < end && tagCount--;) {
             /* 8 = sizeof( sizeValue+flags ) */
-            unsigned long flag = ape2long(p + 4);
+            unsigned long flags = ape2long (p + 4);
             unsigned long sizeValue = ape2long(p);
             unsigned long sizeName;
             char *name = (char *)p + 8;
@@ -763,11 +763,11 @@ apetag_read_fp(apetag *mem_cnt, FILE * fp, const char *filename, int flag)
             sizeName = strlen((char *)p + 8);
             value = (char *)p + sizeName + 8 + 1;
             if (apeTag2 == 1000 && value[sizeValue - 1] == '\0') {
-                libapetag_maloc_cont(mem_cnt, flag,
+                libapetag_maloc_cont(mem_cnt, flags,
                              sizeName, name,
                              sizeValue - 1, value);
             } else {
-                libapetag_maloc_cont(mem_cnt, flag,
+                libapetag_maloc_cont(mem_cnt, flags,
                              sizeName, name,
                              sizeValue, value);
             }
diff --git a/src/tags/mp4_tag.cc b/src/tags/mp4_tag.cc
index 32eaf20..aa3c795 100644
--- a/src/tags/mp4_tag.cc
+++ b/src/tags/mp4_tag.cc
@@ -33,8 +33,11 @@
 #include "charset.h"
 #include "gio_wrapper.h"
 
+/* Shadow warning in public TagLib headers. */
+#pragma GCC diagnostic ignored "-Wshadow"
 #include <mp4file.h>
 #include <mp4tag.h>
+#pragma GCC diagnostic error "-Wshadow"
 #include <tpropertymap.h>
 
 /* Include mp4_header.cc directly. */
@@ -253,12 +256,10 @@ mp4tag_write_file_tag (const ET_File *ETFile,
 
     if (!stream.isOpen ())
     {
-        gchar *filename_utf8 = filename_to_display (filename);
         const GError *tmp_error = stream.getError ();
         g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
                      _("Error while opening file ‘%s’: %s"), filename_utf8,
                      tmp_error->message);
-        g_free (filename_utf8);
         return FALSE;
     }
 
@@ -289,10 +290,8 @@ mp4tag_write_file_tag (const ET_File *ETFile,
 
     if (!(tag = mp4file.tag ()))
     {
-        gchar *filename_utf8 = filename_to_display (filename);
         g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
                      _("Error reading tags from file ‘%s’"), filename_utf8);
-        g_free (filename_utf8);
         return FALSE;
     }
 
diff --git a/src/tags/ogg_tag.c b/src/tags/ogg_tag.c
index 291b7d6..159c5b2 100644
--- a/src/tags/ogg_tag.c
+++ b/src/tags/ogg_tag.c
@@ -1004,19 +1004,21 @@ ogg_tag_write_file_tag (const ET_File *ETFile,
         if (format != PICTURE_FORMAT_PNG && format != PICTURE_FORMAT_JPEG)
         {
             GdkPixbufLoader *loader;
-            gconstpointer data;
-            gsize data_size;
-            GError *error = NULL;
+            gconstpointer old_data;
+            gsize old_data_size;
+            GError *loader_error = NULL;
 
             loader = gdk_pixbuf_loader_new ();
 
-            data = g_bytes_get_data (pic->bytes, &data_size);
+            old_data = g_bytes_get_data (pic->bytes, &old_data_size);
 
             /* TODO: Use gdk_pixbuf_loader_write_bytes() */
-            if (!gdk_pixbuf_loader_write (loader, data, data_size, &error))
+            if (!gdk_pixbuf_loader_write (loader, old_data, old_data_size,
+                                          &loader_error))
             {
-                g_debug ("Error parsing image data: %s", error->message);
-                g_error_free (error);
+                g_debug ("Error parsing image data: %s",
+                         loader_error->message);
+                g_error_free (loader_error);
                 g_object_unref (loader);
                 continue;
             }
@@ -1026,11 +1028,11 @@ ogg_tag_write_file_tag (const ET_File *ETFile,
                 gchar *buffer;
                 gsize buffer_size;
 
-                if (!gdk_pixbuf_loader_close (loader, &error))
+                if (!gdk_pixbuf_loader_close (loader, &loader_error))
                 {
                     g_debug ("Error parsing image data: %s",
-                             error->message);
-                    g_error_free (error);
+                             loader_error->message);
+                    g_error_free (loader_error);
                     g_object_unref (loader);
                     continue;
                 }
@@ -1049,11 +1051,11 @@ ogg_tag_write_file_tag (const ET_File *ETFile,
                 /* Always convert to PNG. */
                 if (!gdk_pixbuf_save_to_buffer (pixbuf, &buffer,
                                                 &buffer_size, "png",
-                                                &error, NULL))
+                                                &loader_error, NULL))
                 {
                     g_debug ("Error while converting image to PNG: %s",
-                             error->message);
-                    g_error_free (error);
+                             loader_error->message);
+                    g_error_free (loader_error);
                     g_object_unref (pixbuf);
                     continue;
                 }
diff --git a/src/tags/vcedit.c b/src/tags/vcedit.c
index 9b2abef..f455ee3 100644
--- a/src/tags/vcedit.c
+++ b/src/tags/vcedit.c
@@ -826,9 +826,7 @@ vcedit_write (EtOggState *state,
         {
             if (state->oggtype == ET_OGG_KIND_VORBIS)
             {
-                int size;
-                size = _blocksize(state, &op);
-                granpos += size;
+                granpos += _blocksize (state, &op);
             }
 #ifdef ENABLE_OPUS
             else


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