From cac443f40fc21d79e164337ce9b3ac9a46350235 Mon Sep 17 00:00:00 2001 From: Alexander Pevzner Date: Thu, 8 Feb 2024 11:49:02 +0300 Subject: [PATCH] Fixed gcc warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In cups/dest.c: dest.c:1830:21: warning: ‘%s’ directive argument is null [-Wformat-overflow=] 1733 | DEBUG_printf(("1cupsGetNamedDest: Using name=\"%s\"...", name)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is really true, and gcc was smart enough to deduct it from context. Obviously, we meant to print dest_name here. --- cups/dest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cups/dest.c b/cups/dest.c index bb62adaf8f..8c27cb5e71 100644 --- a/cups/dest.c +++ b/cups/dest.c @@ -1730,7 +1730,7 @@ cupsGetNamedDest(http_t *http, // I - Connection to server or @code CUPS_HTT DEBUG_puts("1cupsGetNamedDest: Asking server for default printer..."); } else - DEBUG_printf("1cupsGetNamedDest: Using name=\"%s\"...", name); + DEBUG_printf("1cupsGetNamedDest: Using dest_name=\"%s\"...", dest_name); } // -- 2.47.2