]> granicus.if.org Git - postgresql/commitdiff
Suppress compiler warning in non-USE_LIBXML builds.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 8 Mar 2017 21:10:00 +0000 (16:10 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 8 Mar 2017 21:10:00 +0000 (16:10 -0500)
Compilers that don't realize that ereport(ERROR) doesn't return
complained that XmlTableGetValue() failed to return a value.

Also, make XmlTableFetchRow's non-USE_LIBXML case look more like
the other ones.  As coded, it could lead to "unreachable code"
warnings with USE_LIBXML enabled.

Oversights in commit fcec6caaf.  Per buildfarm.

src/backend/utils/adt/xml.c

index 7fd3ec3fae716820f9682308d0bdf9502b4f23e4..04aeb7178e9047af4450502b5a21dbfd74fc7171 100644 (file)
@@ -4389,9 +4389,8 @@ XmlTableFetchRow(TableFuncScanState *state)
        return false;
 #else
        NO_XML_SUPPORT();
-#endif   /* not USE_LIBXML */
-
        return false;
+#endif   /* not USE_LIBXML */
 }
 
 /*
@@ -4561,6 +4560,7 @@ XmlTableGetValue(TableFuncScanState *state, int colnum,
        return result;
 #else
        NO_XML_SUPPORT();
+       return 0;
 #endif   /* not USE_LIBXML */
 }