aboutsummaryrefslogtreecommitdiffstats
path: root/src/libgamma-error.hh
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-09-04 02:24:13 +0200
committerMattias Andrée <maandree@operamail.com>2014-09-04 02:24:13 +0200
commitd9df2815e3c3e32a6a36b0569920459cd1e686b4 (patch)
tree237a865072f5100d372fdc49f50c73b48ce54193 /src/libgamma-error.hh
parentadd makefile (diff)
downloadlibgammamm-d9df2815e3c3e32a6a36b0569920459cd1e686b4.tar.gz
libgammamm-d9df2815e3c3e32a6a36b0569920459cd1e686b4.tar.bz2
libgammamm-d9df2815e3c3e32a6a36b0569920459cd1e686b4.tar.xz
fix warnings
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/libgamma-error.hh')
-rw-r--r--src/libgamma-error.hh10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libgamma-error.hh b/src/libgamma-error.hh
index 12550f2..0bd0fce 100644
--- a/src/libgamma-error.hh
+++ b/src/libgamma-error.hh
@@ -25,6 +25,10 @@
#include "libgamma-native.hh"
+#ifndef __GCC__
+# define __attribute__(X) /* emtpy */
+#endif
+
#ifndef __WIN32__
# define libgamma_gid_t gid_t
@@ -82,7 +86,7 @@ namespace libgamma
* @return The error code, zero if the name is `nullptr`
* or does not refer to a `libgamma` error.
*/
- int value_of_error(const std::string* name);
+ int value_of_error(const std::string* name) __attribute__((pure));
/**
@@ -122,9 +126,9 @@ namespace libgamma
return *this;
}
- operator char*() const
+ operator const char*() const
{
- return (char*)libgamma_group_name;
+ return libgamma_group_name;
}
};