]> granicus.if.org Git - postgresql/commitdiff
I get the following warning when I compile src/bin/pg_id/pg_id.c:
authorBruce Momjian <bruce@momjian.us>
Sat, 9 Aug 2003 01:25:46 +0000 (01:25 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 9 Aug 2003 01:25:46 +0000 (01:25 +0000)
gcc -pipe -g -Wall -Wmissing-prototypes -Wmissing-declarations
-I../../../src/include   -c -o pg_id.o pg_id.c -MMD
pg_id.c: In function `main':
pg_id.c:35: warning: unused variable `optarg'

The attached trivial patch fixes the warning by removing the variable.

Neil Conway

src/bin/pg_id/pg_id.c

index 7a04e63612737b240930030a7acf1c033cd39e63..b8046e93adb52f4743982b3af77df62041cd2bd4 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 2000-2003, PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.21 2003/08/04 23:59:39 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.22 2003/08/09 01:25:46 momjian Exp $
  */
 #include "postgres_fe.h"
 
@@ -32,7 +32,6 @@ main(int argc, char *argv[])
        struct passwd *pw;
 
        extern int      optind;
-       extern char *optarg;
 
        while ((c = getopt(argc, argv, "nru")) != -1)
        {