Skip to content

Commit 3f9700a

Browse files
committed
Suppress -Wformat-overflow warnings in 9.2's xml.c.
If not using --with-libxml, late-model gcc complains about "'%s' directive argument is null" in places where xml.c passes the result of map_sql_identifier_to_xml_name() to %s. That's not so surprising, because without USE_LIBXML the body of that function is NO_XML_SUPPORT(); return NULL; and before 9.3 the compiler won't understand that NO_XML_SUPPORT() doesn't return. Silence the warnings by returning "" instead. We don't need this hack in later branches, AFAICT. Discussion: https://postgr.es/m/d0316012-ece7-7b7e-2d36-9c38cb77cb3b@enterprisedb.com
1 parent cea3168 commit 3f9700a

File tree

1 file changed

+1
-1
lines changed
  • src/backend/utils/adt

1 file changed

+1
-1
lines changed

src/backend/utils/adt/xml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1884,7 +1884,7 @@ map_sql_identifier_to_xml_name(char *ident, bool fully_escaped,
18841884
return buf.data;
18851885
#else /* not USE_LIBXML */
18861886
NO_XML_SUPPORT();
1887-
return NULL;
1887+
return "";
18881888
#endif /* not USE_LIBXML */
18891889
}
18901890

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