On Thu, 23 Sep 2010 at 16:43:13 +0200, Tamas TEVESZ wrote:

> i've attached a number of patches, which should be applied in the 
> following order (please let's not open discussion about my git-fu, 
> i'll eventually get to that...):
> 
>   1 0001-Make-wmalloc-intialize-allocated-memory-to-0.patch
>   2 0001-Return-NULL-on-NULL-input-in-wapplication.c-checkFil.patch
>   3 0001-Simplify-WINGs-wapplicationc-WMPathForResourceOfType.patch
>   4 0001-Add-WINGs-wfilepanel.c-normalizePath.patch
>   5 0001-Simplify-and-rationalize-WINGs-wfilepanel.c-createDi.patch

Thanks a lot for redoing the series!

Now that my 'make V=0 -s' compilation is parseable, I noticed the
following warnings:

  CC     wfilepanel.lo
wfilepanel.c: In function ‘createDir’:
wfilepanel.c:630:3: warning: format ‘%d’ expects type ‘int’, but argument 4 has 
type ‘char *’
wfilepanel.c:630:3: warning: format ‘%d’ expects type ‘int’, but argument 5 has 
type ‘char *’
wfilepanel.c:630:3: warning: format ‘%d’ expects type ‘int’, but argument 4 has 
type ‘char *’
wfilepanel.c:630:3: warning: format ‘%d’ expects type ‘int’, but argument 5 has 
type ‘char *’
wfilepanel.c:598:37: warning: unused variable ‘s’
wfilepanel.c: In function ‘normalizePath’:
wfilepanel.c:658:27: warning: value computed is not used
wfilepanel.c: In function ‘deleteFile’:
wfilepanel.c:678:24: warning: unused variable ‘s’

and apart from the warning at :658, they are gone with the patch below.
May I fold it in the patch which introduced them?


diff --git a/WINGs/wfilepanel.c b/WINGs/wfilepanel.c
index 07d4869..cf0af45 100644
--- a/WINGs/wfilepanel.c
+++ b/WINGs/wfilepanel.c
@@ -595,7 +595,7 @@ static void showError(WMScreen * scr, WMWindow * owner, 
char *s, char *file)
 
 static void createDir(WMButton * bPre, WMFilePanel * panel)
 {
-       char *dirName, *directory, *file, *s;
+       char *dirName, *directory, *file;
        size_t slen;
        WMScreen *scr = WMWidgetScreen(panel->win);
 
@@ -627,7 +627,7 @@ static void createDir(WMButton * bPre, WMFilePanel * panel)
        if (mkdir(file, 00777) != 0) {
 #define __msgbufsize__ 512
                char *buffer = wmalloc(__msgbufsize__);
-               snprintf(buffer, __msgbufsize__, _("Can not create %d: %d"), 
file, strerror(errno));
+               snprintf(buffer, __msgbufsize__, _("Can not create %s: %s"), 
file, strerror(errno));
                showError(scr, panel->win, buffer, NULL);
                wfree(buffer);
 #undef __msgbufsize__
@@ -675,7 +675,7 @@ static void normalizePath(char *s)
 
 static void deleteFile(WMButton * bPre, WMFilePanel * panel)
 {
-       char *file, *buffer, *s;
+       char *file, *buffer;
        struct stat filestat;
        WMScreen *scr = WMWidgetScreen(panel->win);
 #define __msgbufsize__ 512
-- 
1.7.2.2.119.gf9c33


-- 
To unsubscribe, send mail to [email protected].

Reply via email to