From 774dee9abc9eccfbafb0c34760308973f910a9fb Mon Sep 17 00:00:00 2001 From: Meng-Hsiu Chiang Date: Wed, 3 May 2023 00:34:31 +0000 Subject: [PATCH] Fix compiler warnings -Wdeprecated-declarations: Replace deprecated xmlXPathInit() with xmlInitParser()[1] -Wmaybe-uninitialized: `fil1` was initialized to 0 in commit 0138220 to fix compiler warnings, but `fil2` was missed. ref: [1]: https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-xpath.html#xmlXPathInit --- storage/connect/libdoc.cpp | 2 +- storage/connect/tabext.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/connect/libdoc.cpp b/storage/connect/libdoc.cpp index 14e1e44895c..67f22ce29e9 100644 --- a/storage/connect/libdoc.cpp +++ b/storage/connect/libdoc.cpp @@ -600,7 +600,7 @@ xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp) if (trace(1)) htrc("Calling xmlPathInit\n"); - xmlXPathInit(); + xmlInitParser(); if (trace(1)) htrc("Calling xmlXPathNewContext Docp=%p\n", Docp); diff --git a/storage/connect/tabext.cpp b/storage/connect/tabext.cpp index f558cb04f4d..f3a1faf9218 100644 --- a/storage/connect/tabext.cpp +++ b/storage/connect/tabext.cpp @@ -330,7 +330,7 @@ bool TDBEXT::MakeSrcdef(PGLOBAL g) char *catp = strstr(Srcdef, "%s"); if (catp) { - char *fil1 = 0, *fil2; + char *fil1 = 0, *fil2 = 0; PCSZ ph = ((EXTDEF*)To_Def)->Phpos; if (!ph)