blob: 43c946ca35fe420cee985dce16482375591c8ee7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
https://github.com/markfasheh/duperemove/commit/5cbcc65254cf684b4281b278b5ee38c82d0a3ee5
From 5cbcc65254cf684b4281b278b5ee38c82d0a3ee5 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyich@gmail.com>
Date: Mon, 20 Nov 2023 21:09:58 +0000
Subject: [PATCH] util.c: make debug helper `-Wformat-security`-clean
Without the change `gcc-14` fails the build with `-Werror=format-security`
as:
util.c:340:25: error: format not a string literal and no format arguments [-Werror=format-security]
340 | fprintf(stream, buf);
| ^~~
It's a harmless warning as `UUID` has a well-defined set of characters.
But `fputs()` expresses intent more directly to print the string as is.
--- a/util.c
+++ b/util.c
@@ -337,5 +337,5 @@ void debug_print_uuid(FILE *stream, uuid_t uuid)
{
char buf[37];
uuid_unparse(uuid, buf);
- fprintf(stream, buf);
+ fputs(buf, stream);
}
|