[PATCH] wpp: Do not pass NULL %s to fprintf.

Rémi Bernon rbernon at codeweavers.com
Tue Feb 11 08:49:12 CST 2020


It works but it's undefined behavior and it generates a warning.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 libs/wpp/ppl.l | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libs/wpp/ppl.l b/libs/wpp/ppl.l
index 4fd12c6b172..505df41bcf9 100644
--- a/libs/wpp/ppl.l
+++ b/libs/wpp/ppl.l
@@ -1620,8 +1620,8 @@ void pp_do_include(char *fname, int type)
 	pp_incl_state.ppp = NULL;
 
 	if(pp_status.debug)
-		fprintf(stderr, "pp_do_include: %s:%d: include_state=%d, include_ppp='%s', include_ifdepth=%d\n",
-                        pp_status.input, pp_status.line_number, pp_incl_state.state, pp_incl_state.ppp, pp_incl_state.ifdepth);
+		fprintf(stderr, "pp_do_include: %s:%d: include_state=%d, include_ppp='(null)', include_ifdepth=%d\n",
+                        pp_status.input, pp_status.line_number, pp_incl_state.state, pp_incl_state.ifdepth);
 	pp_status.file = fp;
 	ppy__switch_to_buffer(ppy__create_buffer(NULL, YY_BUF_SIZE));
 
-- 
2.25.0




More information about the wine-devel mailing list