aboutsummaryrefslogtreecommitdiff
path: root/nxcompshad/src/Logger.h
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-03-01 12:04:25 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-03-01 12:04:25 +0100
commit176f9b471b2ec67dd95e054d9a22ab87c8110b7c (patch)
treedeae1ad544bd1a7eb585e60ae612aaa7ae63744f /nxcompshad/src/Logger.h
parentd156ce5ab6afa3bc67189f4985e1517d5aca52b3 (diff)
parent7c8214f31fd3d83e641067941573ebb89f4f4ddb (diff)
downloadnx-libs-176f9b471b2ec67dd95e054d9a22ab87c8110b7c.tar.gz
nx-libs-176f9b471b2ec67dd95e054d9a22ab87c8110b7c.tar.bz2
nx-libs-176f9b471b2ec67dd95e054d9a22ab87c8110b7c.zip
Merge branch 'uli42-pr/fix_clang_warnings' into 3.6.x
Attributes GH PR #763: https://github.com/ArcticaProject/nx-libs/pull/763
Diffstat (limited to 'nxcompshad/src/Logger.h')
-rw-r--r--nxcompshad/src/Logger.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/nxcompshad/src/Logger.h b/nxcompshad/src/Logger.h
index 876cb0432..8436c5f15 100644
--- a/nxcompshad/src/Logger.h
+++ b/nxcompshad/src/Logger.h
@@ -29,9 +29,6 @@
#include <cerrno>
#include <cstdarg>
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
-
//
// Error handling macros.
//
@@ -46,17 +43,17 @@ class Logger
{
public:
- void user(const char *format, ...) __attribute__((format(gnu_printf, 2, 3)));
+ void user(const char *format, ...) __attribute__((format(printf, 2, 0)));
void error(const char *name, int error);
- void warning(const char *name, const char *format, ...) __attribute__((format(gnu_printf, 3, 4)));
+ void warning(const char *name, const char *format, ...) __attribute__((format(printf, 3, 0)));
- void test(const char *name, const char *format, ...) __attribute__((format(gnu_printf, 3, 4)));
+ void test(const char *name, const char *format, ...) __attribute__((format(printf, 3, 0)));
void trace(const char *name);
- void debug(const char *name, const char *format, ...) __attribute__((format(gnu_printf, 3, 4)));
+ void debug(const char *name, const char *format, ...) __attribute__((format(printf, 3, 0)));
void dump(const char *name, const char *data, int size);
};
@@ -68,7 +65,7 @@ static inline void logError(const char *name, int error) \
__attribute__((__unused__));
static inline void logWarning(const char *name, const char *format, ...) \
- __attribute__((__unused__));
+ __attribute__((format(printf, 2, 3))) __attribute__((__unused__));
static inline void logTest(const char *name, const char *format, ...) \
__attribute__((format(printf, 2, 3))) __attribute__((__unused__));
@@ -167,6 +164,4 @@ static inline void logDump(const char *name, const char *data, int size)
#endif
}
-#pragma GCC diagnostic pop
-
#endif /* Logger_H */