]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Prevent possible compiler warnings.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 30 Nov 2013 16:12:16 +0000 (11:12 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 30 Nov 2013 16:12:16 +0000 (11:12 -0500)
Back-patch commit a3e8486dffc413506b14eae9dc5d423f6ae8324a into the 9.0
branch.  This is the only warning I'm seeing in the live branches with
gcc 4.4.7 (other than the known "unused variable 'yyg'" flex lossage),
which makes it just annoying enough to want to clean up.

src/backend/utils/adt/dbsize.c

index 0bbc02e5ad729de51989880190d48305c3aefb5a..9f0d9e7879feed03f1ef86a90092c0c3a2ecef78 100644 (file)
@@ -609,6 +609,9 @@ pg_relation_filepath(PG_FUNCTION_ARGS)
                default:
                        /* no storage, return NULL */
                        rnode.relNode = InvalidOid;
+                       /* some compilers generate warnings without these next two lines */
+                       rnode.dbNode = InvalidOid;
+                       rnode.spcNode = InvalidOid;
                        break;
        }