Skip to content

Instantly share code, notes, and snippets.

@LinuxMatt
Created March 2, 2015 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LinuxMatt/2211af1ec5c73e3c533f to your computer and use it in GitHub Desktop.
Save LinuxMatt/2211af1ec5c73e3c533f to your computer and use it in GitHub Desktop.
[PATCH] Fix compiler warning about shadow 'basename' in thunar-file.c
From 3f62f21109e2fa24d52c7f2d64dfbe71b2e3c3fa Mon Sep 17 00:00:00 2001
From: Matt Thirtytwo <matt.59491@gmail.com>
Date: Mon, 2 Mar 2015 21:51:36 +0100
Subject: [PATCH] Fix compiler warning about shadow 'basename' in
thunar-file.c
---
thunar/thunar-file.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 9b5aa9b..7f16222 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -3374,7 +3374,7 @@ const gchar *
thunar_file_get_thumbnail_path (ThunarFile *file)
{
GChecksum *checksum;
- gchar *basename;
+ gchar *filename;
gchar *uri;
_thunar_return_val_if_fail (THUNAR_IS_FILE (file), NULL);
@@ -3392,7 +3392,7 @@ thunar_file_get_thumbnail_path (ThunarFile *file)
g_checksum_update (checksum, (const guchar *) uri, strlen (uri));
g_free (uri);
- basename = g_strconcat (g_checksum_get_string (checksum), ".png", NULL);
+ filename = g_strconcat (g_checksum_get_string (checksum), ".png", NULL);
g_checksum_free (checksum);
/* The thumbnail is in the format/location
@@ -3406,7 +3406,7 @@ thunar_file_get_thumbnail_path (ThunarFile *file)
/* build and check if the thumbnail is in the new location */
file->thumbnail_path = g_build_path ("/", g_get_user_cache_dir(),
"thumbnails", "normal",
- basename, NULL);
+ filename, NULL);
if (!g_file_test(file->thumbnail_path, G_FILE_TEST_EXISTS))
{
@@ -3414,7 +3414,7 @@ thunar_file_get_thumbnail_path (ThunarFile *file)
g_free(file->thumbnail_path);
file->thumbnail_path = g_build_filename (xfce_get_homedir (), ".thumbnails",
- "normal", basename, NULL);
+ "normal", filename, NULL);
if(!g_file_test(file->thumbnail_path, G_FILE_TEST_EXISTS))
{
@@ -3424,7 +3424,7 @@ thunar_file_get_thumbnail_path (ThunarFile *file)
}
}
- g_free (basename);
+ g_free (filename);
}
}
--
1.7.9.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment