]> granicus.if.org Git - postgresql/commitdiff
Suppress uninitialized-variable warning in new SCRAM code.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 24 Aug 2018 14:51:10 +0000 (10:51 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 24 Aug 2018 14:51:25 +0000 (10:51 -0400)
While we generally don't sweat too much about "may be used uninitialized"
warnings from older compilers, I noticed that there's a fair number of
buildfarm animals that are producing such a warning *only* for this
variable.  So it seems worth silencing.

src/backend/libpq/auth.c

index 68bb62d873c69b60c81630f4397a6903d550bc96..85175655359829a2cf50dd883066bbb3d45e2286 100644 (file)
@@ -865,7 +865,7 @@ CheckSCRAMAuth(Port *port, char *shadow_pass, char **logdetail)
        StringInfoData sasl_mechs;
        int                     mtype;
        StringInfoData buf;
-       void       *scram_opaq;
+       void       *scram_opaq = NULL;
        char       *output = NULL;
        int                     outputlen = 0;
        char       *input;