[gnome-commander/ConvertWarningsToErrors] Adds format attribute to method definition to suppress suggest-attribute=format warning
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/ConvertWarningsToErrors] Adds format attribute to method definition to suppress suggest-attribute=format warning
- Date: Mon, 17 Apr 2017 13:03:21 +0000 (UTC)
commit 8cbd9138650201baf279ff960046cfe41d264b87
Author: Uwe Scholz <uwescholz src gnome org>
Date: Mon Apr 17 15:02:46 2017 +0200
Adds format attribute to method definition to suppress suggest-attribute=format warning
src/tags/gnome-cmd-tags.cc | 1 -
src/tags/gnome-cmd-tags.h | 7 +++++--
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/tags/gnome-cmd-tags.cc b/src/tags/gnome-cmd-tags.cc
index e6f3007..1d08955 100644
--- a/src/tags/gnome-cmd-tags.cc
+++ b/src/tags/gnome-cmd-tags.cc
@@ -38,7 +38,6 @@
using namespace std;
-
struct GnomeCmdTagName
{
const gchar *name;
diff --git a/src/tags/gnome-cmd-tags.h b/src/tags/gnome-cmd-tags.h
index 6a66066..55239fe 100644
--- a/src/tags/gnome-cmd-tags.h
+++ b/src/tags/gnome-cmd-tags.h
@@ -543,8 +543,11 @@ class GnomeCmdFileMetadata
void add (const GnomeCmdTag tag, const gchar *value);
template <typename T>
void add (const GnomeCmdTag tag, const T &value);
- void addf (const GnomeCmdTag tag, const gchar *fmt, ...);
-
+#ifdef __GNUC__
+ void addf (const GnomeCmdTag tag, const gchar *fmt, ...) __attribute__ ((format (gnu_printf, 3, 4)));
+#else
+ void addf (const GnomeCmdTag tag, const gchar *fmt, ...)
+#endif
gboolean has_tag (const GnomeCmdTag tag);
const std::string operator[] (const GnomeCmdTag tag);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]