diff options
author | Mattias Andrée <maandree@kth.se> | 2016-07-10 16:00:34 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-07-10 16:00:34 +0200 |
commit | 58f8347e84d2820cada64c513bb0f2b81ecd494a (patch) | |
tree | 758f5f2241c384b8d0e8ce349498784515ae5607 /src/libmdsserver/util.c | |
parent | Add -l flags for mds-libinput (diff) | |
download | mds-58f8347e84d2820cada64c513bb0f2b81ecd494a.tar.gz mds-58f8347e84d2820cada64c513bb0f2b81ecd494a.tar.bz2 mds-58f8347e84d2820cada64c513bb0f2b81ecd494a.tar.xz |
Fix new GCC warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | src/libmdsserver/util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libmdsserver/util.c b/src/libmdsserver/util.c index 14df3a9..a3e18a9 100644 --- a/src/libmdsserver/util.c +++ b/src/libmdsserver/util.c @@ -298,6 +298,13 @@ int strict_atoj(const char* str, intmax_t* value, intmax_t min, intmax_t max) } +#if defined(__GNUC__) +/* GCC says strict_atouj is a candidate for the attribute ‘pure’, + * however the line `*value = r` means that it is not, at least + * if you only consider what GCC's manuals says about the attribute. */ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" +#endif /** * A version of `atouj` that is strict about the syntax and bounds * @@ -334,6 +341,9 @@ int strict_atouj(const char* str, uintmax_t* value, uintmax_t min, uintmax_t max *value = r; return 0; } +#if defined(__GNUC__) +# pragma GCC diagnostic pop +#endif #define __strict_y(Y, TYPE, PARA_TYPE, HYPER_Y, HYPER_TYPE) \ |