Skip to content

Commit 6ec4520

Browse files
committed
Supress warning about zero-length format string.
1 parent 7ee3c35 commit 6ec4520

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/bin/pg_dump/pg_dumpall.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1994, Regents of the University of California
77
*
88
*
9-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.47 2004/08/08 06:44:33 momjian Exp $
9+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.48 2004/08/08 06:58:00 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -858,20 +858,20 @@ runPgDump(const char *dbname)
858858
#ifndef WIN32
859859
if (*p == '\'')
860860
appendPQExpBuffer(cmd, "'\"'\"'");
861-
else
861+
#else
862+
if (*p == '"')
863+
appendPQExpBuffer(cmd, "\\\"");
862864
#endif
863-
/* not needed on Win32 */
865+
else
864866
appendPQExpBufferChar(cmd, *p);
865867
}
866868

867869
#ifndef WIN32
868870
appendPQExpBufferChar(cmd, '\'');
869871
#else
870872
appendPQExpBufferChar(cmd, '"');
873+
appendPQExpBuffer(cmd, SYSTEMQUOTE);
871874
#endif
872-
873-
if (strlen(SYSTEMQUOTE) > 0)
874-
appendPQExpBuffer(cmd, SYSTEMQUOTE);
875875

876876
if (verbose)
877877
fprintf(stderr, _("%s: running \"%s\"\n"), progname, cmd->data);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy