Skip to contentSkip to conversation

libmultipath: fix format warning with clang

PATCH In review [email protected] 3 participants 3 messages Dec 18, 2020 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libmultipath: fix format warning with clang

From: Martin Wilck <[email protected]>

---
 libmultipath/log.c | 1 +
 1 file changed, 1 insertion(+)
libmultipath/log.c +1 -0
index 6498c88..10fa32c 100644
@@ -125,6 +125,7 @@ void log_reset (char *program_name)
 	pthread_cleanup_pop(1);
 }
 
+__attribute__((format(printf, 2, 0)))
 static int _log_enqueue(int prio, const char * fmt, va_list ap)
 {
 	int len, fwd;
Signature · 7 lines
2.29.0


--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Tested-by on v1 1/1
#1 lore raw
Quoted 3 lines · On 12/18/20 11:37 PM, [email protected] wrote:

From: Martin Wilck <[email protected]>

Quoted 10 lines
---
  libmultipath/log.c | 1 +
  1 file changed, 1 insertion(+)
libmultipath/log.c +0 -0
index 6498c88..10fa32c 100644

libmultipath/log.c void log_reset (char *program_name) · line 131

Quoted 7 lines
libmultipath/log.c +1 -0
@@ -125,6 +125,7 @@ void log_reset (char *program_name)
  	pthread_cleanup_pop(1);
  }
 
+__attribute__((format(printf, 2, 0)))
  static int _log_enqueue(int prio, const char * fmt, va_list ap)
  {
  	int len, fwd;

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 2 lines · On Fri, Dec 18, 2020 at 11:37:53PM +0100, [email protected] wrote:

From: Martin Wilck <[email protected]>

Quoted 19 lines
---
 libmultipath/log.c | 1 +
 1 file changed, 1 insertion(+)
libmultipath/log.c +1 -0
index 6498c88..10fa32c 100644
@@ -125,6 +125,7 @@ void log_reset (char *program_name)
 	pthread_cleanup_pop(1);
 }
 
+__attribute__((format(printf, 2, 0)))
 static int _log_enqueue(int prio, const char * fmt, va_list ap)
 {
 	int len, fwd;
Signature · 1 line
2.29.0

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel