]> granicus.if.org Git - postgresql/commitdiff
entab: Fix some compiler warnings
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 30 Jan 2013 03:21:21 +0000 (22:21 -0500)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 30 Jan 2013 03:21:21 +0000 (22:21 -0500)
src/tools/entab/entab.c
src/tools/entab/halt.c

index 5345c657f5758b748d1b62baac6b24dcf237cb37..cb5a406345ef5f034fe166fa5b8c791c87dde505 100644 (file)
@@ -14,6 +14,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdarg.h>
+#include <unistd.h>
 
 #if defined(WIN32) || defined(__CYGWIN__)
 #define PG_BINARY_R "rb"
@@ -181,10 +182,12 @@ main(int argc, char **argv)
                                                if (*src == '\\')
                                                        escaped = TRUE;
                                                if (*src == '"' || *src == '\'')
+                                               {
                                                        if (quote_char == ' ')
                                                                quote_char = *src;
                                                        else if (*src == quote_char)
                                                                quote_char = ' ';
+                                               }
                                        }
                                        else if (*src != '\r' && *src != '\n')
                                                escaped = FALSE;
index dfc5936fadc8ecdbf066ccfe61535fc3a881b836..e7d2e4496beea49a19e9f1460e1f56ff75d56ecc 100644 (file)
@@ -11,6 +11,7 @@
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <errno.h>