]> granicus.if.org Git - postgis/commitdiff
Fix warning about unchecked return code
authorSandro Santilli <strk@keybit.net>
Tue, 17 Feb 2015 11:22:04 +0000 (11:22 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 17 Feb 2015 11:22:04 +0000 (11:22 +0000)
The code path is actually never hit as far as I can tell

git-svn-id: http://svn.osgeo.org/postgis/trunk@13227 b70326c6-7e19-0410-871a-916f4a2858ee

loader/getopt.c

index 7c1145def6729690718449183e808cc60da5ef83..cf12879ed7d7a3301f00431e6ce219082be5a694 100644 (file)
 
 #define ERR(s, c)\
   if(pgis_opterr){\
-        char errbuf[2];\
-        errbuf[0] = (char)c; errbuf[1] = '\n';\
-        (void) write(2, argv[0], (unsigned)strlen(argv[0]));\
-        (void) write(2, s, (unsigned)strlen(s));\
-        (void) write(2, errbuf, 2);\
+    fprintf(stderr, "%s%s%c\n", argv[0], s, c);\
   }
 
 int     pgis_opterr = 1;