]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fixed gcc warning 888/head
authorAlexander Pevzner <pzz@apevzner.com>
Thu, 8 Feb 2024 08:49:02 +0000 (11:49 +0300)
committerAlexander Pevzner <pzz@apevzner.com>
Thu, 8 Feb 2024 16:10:42 +0000 (19:10 +0300)
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

index 259e37bf081fbbf5ae86df7d290cad5635c07bf4..bedd4e1701ade65b754b96236a9b0939786a701d 100644 (file)
@@ -1827,7 +1827,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));
   }
 
  /*