diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-04-06 16:27:41 +0200 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2020-04-11 14:16:25 +0200 |
commit | 765813e908e0f23e98ec6224b0408a152a9d3ec0 (patch) | |
tree | 1e4140aa1a097fe081b05d74334f95973a309e28 /src/libutil | |
parent | d6da3282ea865b8c39fab3e7026296fa922e1a64 (diff) | |
download | rspamd-765813e908e0f23e98ec6224b0408a152a9d3ec0.tar.gz rspamd-765813e908e0f23e98ec6224b0408a152a9d3ec0.zip |
[Minor] silence warnings about unused function results
GCC does not respect `(void) func()`
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/multipattern.c | 6 | ||||
-rw-r--r-- | src/libutil/sqlite_utils.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libutil/multipattern.c b/src/libutil/multipattern.c index 547762d26..8ddd9af38 100644 --- a/src/libutil/multipattern.c +++ b/src/libutil/multipattern.c @@ -256,7 +256,7 @@ rspamd_multipattern_create (enum rspamd_multipattern_flags flags) struct rspamd_multipattern *mp; /* Align due to blake2b state */ - posix_memalign((void **)&mp, _Alignof (struct rspamd_multipattern), + (void) !posix_memalign((void **)&mp, _Alignof (struct rspamd_multipattern), sizeof (*mp)); g_assert (mp != NULL); memset (mp, 0, sizeof (*mp)); @@ -285,7 +285,7 @@ rspamd_multipattern_create_sized (guint npatterns, struct rspamd_multipattern *mp; /* Align due to blake2b state */ - posix_memalign((void **)&mp, _Alignof (struct rspamd_multipattern), sizeof (*mp)); + (void) !posix_memalign((void **)&mp, _Alignof (struct rspamd_multipattern), sizeof (*mp)); g_assert (mp != NULL); memset (mp, 0, sizeof (*mp)); mp->flags = flags; @@ -789,4 +789,4 @@ gboolean rspamd_multipattern_has_hyperscan (void) { return rspamd_hs_check (); -}
\ No newline at end of file +} diff --git a/src/libutil/sqlite_utils.c b/src/libutil/sqlite_utils.c index 9bb0b9c1f..f9e47032c 100644 --- a/src/libutil/sqlite_utils.c +++ b/src/libutil/sqlite_utils.c @@ -356,7 +356,7 @@ rspamd_sqlite3_open_or_create (rspamd_mempool_t *pool, const gchar *path, const else { pid_t myself = getpid (); msg_debug_pool_check ("locking %s to block other processes", lock_path); - (void)write (lock_fd, &myself, sizeof (myself)); + (void) !write (lock_fd, &myself, sizeof (myself)); g_assert (rspamd_file_lock (lock_fd, FALSE)); has_lock = TRUE; |