[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gv] [PATCH] Silence two warnings
From: |
Bernhard R. Link |
Subject: |
[bug-gv] [PATCH] Silence two warnings |
Date: |
Sat, 27 Sep 2008 19:25:49 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
That function has no prototype. As it is not used outside,
it can just be made static (and when changing the line I suggest
going away from K&R style...).
Index: src/file.c
===================================================================
RCS file: /sources/gv/gv/src/file.c,v
retrieving revision 1.18
diff -u -r1.18 file.c
--- src/file.c 2 Sep 2008 11:42:43 -0000 1.18
+++ src/file.c 27 Sep 2008 17:19:54 -0000
@@ -135,10 +135,7 @@
/* file_assureDirectory */
/*############################################################*/
-void
-file_assureDirectory(to,from)
- char *to;
- char *from;
+static void file_assureDirectory(char *to, const char *from)
{
int len;
BEGINMESSAGE(file_assureDirectory)
An assignment in an if clause causes gcc to warn and looks also
very strange to read. I suggest just moving it to its own statement:
Index: src/info.c
===================================================================
RCS file: /sources/gv/gv/src/info.c,v
retrieving revision 1.15
diff -u -r1.15 info.c
--- src/info.c 24 Aug 2008 10:33:48 -0000 1.15
+++ src/info.c 27 Sep 2008 17:19:54 -0000
@@ -141,7 +141,8 @@
XtSetValues(infotext,args,n);
XawTextEnableRedisplay(infotext);
- if (skipErrors = gv_infoSkipErrors)
+ skipErrors = gv_infoSkipErrors;
+ if (gv_infoSkipErrors)
if (strstr((char*)call_data, "Error:") || strstr((char*)call_data,
"ERROR:") || strstr((char*)call_data, "error:"))
--gv_infoSkipErrors;
Hochachtungsvoll,
Bernhard R. Link
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug-gv] [PATCH] Silence two warnings,
Bernhard R. Link <=