diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-01-26 10:39:03 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-01-26 10:39:03 -0500 |
commit | ebf31a1f58d0b10ca63c928ff31b7745fc724003 (patch) | |
tree | e18d1e86c9c773b6be15039224329f60b44171ef /src/tmpfiles | |
parent | 9cccac8cd23cb3cd9a4c46cdabf26a9501769b30 (diff) | |
download | systemd-ebf31a1f58d0b10ca63c928ff31b7745fc724003.tar.gz systemd-ebf31a1f58d0b10ca63c928ff31b7745fc724003.tar.bz2 systemd-ebf31a1f58d0b10ca63c928ff31b7745fc724003.zip |
tmpfiles: use casts instead of warning suppression
This warning got its own name only in gcc5, so the suppression does
not work in gcc4, and generates a warning of its own. Use a cast,
which is ugly too, but less so.
Diffstat (limited to 'src/tmpfiles')
-rw-r--r-- | src/tmpfiles/tmpfiles.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index d70dbc4707..d60d5ba6ff 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -879,17 +879,13 @@ static int item_do_children(Item *i, const char *path, action_t action) { } static int glob_item(Item *i, action_t action, bool recursive) { -DISABLE_WARNING_INCOMPATIBLE_POINTER_TYPES -DISABLE_WARNING_DECLARATION_AFTER_STATEMENT _cleanup_globfree_ glob_t g = { - .gl_closedir = closedir, - .gl_readdir = readdir, - .gl_opendir = opendir_nomod, + .gl_closedir = (void (*)(void *)) closedir, + .gl_readdir = (struct dirent *(*)(void *)) readdir, + .gl_opendir = (void *(*)(const char *)) opendir_nomod, .gl_lstat = lstat, .gl_stat = stat, }; -REENABLE_WARNING -REENABLE_WARNING int r = 0, k; char **fn; |