File: fix-GCC-6.patch

package info (click to toggle)
ucimf-openvanilla 2.10.11-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 1,484 kB
  • sloc: sh: 10,131; cpp: 900; makefile: 21; ansic: 18
file content (30 lines) | stat: -rw-r--r-- 1,590 bytes parent folder | download
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
26
27
28
29
30
From: =?utf-8?b?IkNoYW5nWmh1byBDaGVuICjpmbPmmIzlgKwpIg==?=
 <czchen@debian.org>
Date: Wed, 18 Jan 2017 06:02:00 +0800
Subject: fix-GCC-6

---
 src/debug.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/debug.h b/src/debug.h
index 105defa..a1acce5 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -3,10 +3,10 @@
 #endif
 #include <stdio.h>
 
-#define UCIMF_ERR(format...)    	{extern int LogFd; if( LogFd >=0 ){ dprintf( LogFd, "[Err]:"format  );} }
-#define UCIMF_WARNING(format...)        {extern int LogFd; if( LogFd >=0 ){ dprintf( LogFd, "[WARN]:"format );} } 
-#define UCIMF_INFO(format...)           {extern int LogFd; if( LogFd >=0 ){ dprintf( LogFd, "[INFO]:"format );} } 
-#define UCIMF_DEBUG(format...)          {extern int LogFd; if( LogFd >=0 ){ dprintf( LogFd, "[DEBUG]:"format);} } 
+#define UCIMF_ERR(format, ...)    	{extern int LogFd; if( LogFd >=0 ){ dprintf( LogFd, "[Err]:" #format, ##__VA_ARGS__  );} }
+#define UCIMF_WARNING(format, ...)        {extern int LogFd; if( LogFd >=0 ){ dprintf( LogFd, "[WARN]:" #format, ##__VA_ARGS__ );} } 
+#define UCIMF_INFO(format, ...)           {extern int LogFd; if( LogFd >=0 ){ dprintf( LogFd, "[INFO]:" #format, ##__VA_ARGS__ );} } 
+#define UCIMF_DEBUG(format, ...)          {extern int LogFd; if( LogFd >=0 ){ dprintf( LogFd, "[DEBUG]:" #format, ##__VA_ARGS__);} } 
 
-#define UrINFO(format...) UCIMF_INFO(format)
-#define UrDEBUG(format...) UCIMF_DEBUG(format)
+#define UrINFO(format, ...) UCIMF_INFO(#format, ##__VA_ARGS__)
+#define UrDEBUG(format, ...) UCIMF_DEBUG(#format, ##__VA_ARGS__)