[easytag] Remove further unused and set-but-unused variables



commit 0155bc66f7ee365f8824b485f3ec312079ebba7e
Author: David King <amigadave amigadave com>
Date:   Sat Jan 12 08:45:23 2013 +0000

    Remove further unused and set-but-unused variables

 src/cddb.c        |   20 +-------------------
 src/easytag.c     |    1 -
 src/mpeg_header.c |   22 ++++++++--------------
 3 files changed, 9 insertions(+), 34 deletions(-)
---
diff --git a/src/cddb.c b/src/cddb.c
index 7e86c47..86f82ab 100644
--- a/src/cddb.c
+++ b/src/cddb.c
@@ -1164,8 +1164,6 @@ void Cddb_Search_String_In_Result (GtkWidget *entry, GtkButton *button)
     gchar *text;
     gchar *temp;
     gint   i;
-    gint  *indices = NULL;
-    gint  toloop;
     gint  rowcount;
     GtkTreeSelection* treeSelection;
     GtkTreeIter iter;
@@ -1237,20 +1235,6 @@ void Cddb_Search_String_In_Result (GtkWidget *entry, GtkButton *button)
             } while(gtk_tree_model_iter_next(GTK_TREE_MODEL(CddbAlbumListModel), &iter));
         }
 
-        /* If no results have been found, start the search again from the beginning */
-        /* If we have had an item selected, we need to stop at that one to avoid re-searching the same entries */
-        if(itemselected == TRUE)
-        {
-            rowpath = gtk_tree_model_get_path(GTK_TREE_MODEL(CddbAlbumListModel), &itercopy);
-            if (rowpath)
-                indices = gtk_tree_path_get_indices(rowpath);
-            gtk_tree_path_free(rowpath);
-            toloop = indices[0];
-        } else
-        {
-            toloop = rowcount;
-        }
-
         for (i = 0; i < rowcount; i++)
         {
             gboolean found;
@@ -1747,7 +1731,6 @@ gint Cddb_Write_Result_To_File (gint socket_id, gulong *bytes_read_total)
 {
     gchar *file_path = NULL;
     FILE  *file;
-    gint result;
 
     /* Cache directory was already created by Log_Print(). */
     file_path = g_build_filename (g_get_user_cache_dir (), PACKAGE_TARNAME,
@@ -4255,11 +4238,10 @@ gchar *Cddb_Format_Proxy_Authentification (void)
 
         gchar *tempstr;
         gchar *str_encoded;
-        gint size;
 
         tempstr = g_strconcat(CDDB_PROXY_USER_NAME, ":", CDDB_PROXY_USER_PASSWORD, NULL);
         //str_encoded = base64_encode(tempstr);
-        size = base64_encode(tempstr, strlen(tempstr), &str_encoded);
+        base64_encode (tempstr, strlen(tempstr), &str_encoded);
 
         ret = g_strdup_printf("Proxy-authorization: Basic %s\r\n", str_encoded);
         g_free (str_encoded);
diff --git a/src/easytag.c b/src/easytag.c
index c3a9bea..be8b75f 100644
--- a/src/easytag.c
+++ b/src/easytag.c
@@ -182,7 +182,6 @@ int main (int argc, char *argv[])
     GtkWidget *HBox, *VBox;
     struct stat statbuf;
     //GError *error = NULL;
-    GdkPixbuf *pixbuf;
 
 
 #ifdef WIN32
diff --git a/src/mpeg_header.c b/src/mpeg_header.c
index 260d9e5..4515cb7 100644
--- a/src/mpeg_header.c
+++ b/src/mpeg_header.c
@@ -113,7 +113,6 @@ gboolean Mpeg_Header_Read_File_Info (gchar *filename, ET_File_Info *ETFileInfo)
         guint32 head;
         unsigned char tmp[4];
         struct frame frm;
-        gboolean id3_found = FALSE;
 
         if (fread(tmp, 1, 4, file) != 4)
         {
@@ -157,9 +156,7 @@ gboolean Mpeg_Header_Read_File_Info (gchar *filename, ET_File_Info *ETFileInfo)
         {
             guchar *buf;
             gdouble tpf;
-            gint pos;
             XHEADDATA xing_header;
-            guint32 num_frames;
 
             buf = g_malloc(frm.framesize + 4);
             fseek(file, -4, SEEK_CUR);
@@ -174,28 +171,25 @@ gboolean Mpeg_Header_Read_File_Info (gchar *filename, ET_File_Info *ETFileInfo)
             //if (ETFileInfo->mpeg25) g_print("mpeg_level: MPEG 2.5, layer %d\n",ETFileInfo->layer);
             //else                    g_print("mpeg_level: MPEG %d, layer %d\n",ETFileInfo->version,ETFileInfo->layer);
 
-            pos = ftell(file);
             fseek(file, 0, SEEK_END);
             // Variable bitrate? + bitrate
             if ( (ETFileInfo->variable_bitrate=mpg123_get_xing_header(&xing_header,buf)) )
             {
-                num_frames = xing_header.frames;
                 ETFileInfo->bitrate = (gint) ((xing_header.bytes * 8) / (tpf * xing_header.frames * 1000));
-                //g_print("Bitrate: Variable,\navg. bitrate: %d kb/s\n",ETFileInfo->bitrate);
+                /* g_print ("Bitrate: Variable,\navg. bitrate: %d kb/s\n",ETFileInfo->bitrate); */
             } else
             {
-                num_frames = ((ftell(file) - pos - (id3_found ? 128 : 0)) / mpg123_compute_bpf(&frm)) + 1;
                 ETFileInfo->bitrate = tabsel_123[frm.lsf][frm.lay - 1][frm.bitrate_index];
-                //g_print("Bitrate: %d kb/s\n",ETFileInfo->bitrate);
+                /* g_print ("Bitrate: %d kb/s\n",ETFileInfo->bitrate); */
             }
-            // Samplerate
+            /* Samplerate. */
             ETFileInfo->samplerate = mpg123_freqs[frm.sampling_frequency];
-            // Mode
+            /* Mode. */
             ETFileInfo->mode = frm.mode;
-            //g_print("Samplerate: %ld Hz\n", mpg123_freqs[frm.sampling_frequency]);
-            //g_print("%s\nError protection: %s\nCopyright: %s\nOriginal: %s\nEmphasis: %s\n", channel_mode_name(frm.mode), bool_label[frm.error_protection], bool_label[frm.copyright], bool_label[frm.original], emphasis[frm.emphasis]);
-            //g_print("%d frames\nFilesize: %lu B\n", num_frames, ftell(file));
-            g_free(buf);
+            /* g_print ("Samplerate: %ld Hz\n", mpg123_freqs[frm.sampling_frequency]);
+            g_print ("%s\nError protection: %s\nCopyright: %s\nOriginal: %s\nEmphasis: %s\n", channel_mode_name(frm.mode), bool_label[frm.error_protection], bool_label[frm.copyright], bool_label[frm.original], emphasis[frm.emphasis]);
+            g_print ("Filesize: %lu B\n", ftell(file)); */
+            g_free (buf);
         }
 
         // Duration



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