diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2015-12-12 02:34:47 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-12-14 23:52:28 +0000 |
commit | fbf2e3cf8fc07ef9f8b7cc4627fec82885560f98 (patch) | |
tree | 1eaf16ee020f4d5cd043497b5784eb4a8a0ab127 /wsutil/filesystem.c | |
parent | d835b271679c5e5eae7146b96ae1a65cbd5c16b4 (diff) |
Make init_progfile_dir() take a function pointer [-Wpedantic]
Change-Id: I45f8ea5ee6ccc5a484c60ad6e686aaf30f6b0c98
Reviewed-on: https://code.wireshark.org/review/12557
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil/filesystem.c')
-rw-r--r-- | wsutil/filesystem.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c index 787ad6ebb4..e8bdea325a 100644 --- a/wsutil/filesystem.c +++ b/wsutil/filesystem.c @@ -62,6 +62,7 @@ #include <wsutil/report_err.h> #include <wsutil/privileges.h> #include <wsutil/file_util.h> +#include <wsutil/ws_diag_control.h> #include <wiretap/wtap.h> /* for WTAP_ERR_SHORT_WRITE */ @@ -454,7 +455,7 @@ init_progfile_dir(const char *arg0 #ifdef _WIN32 _U_ #endif -, void *function_addr +, int (*function_addr)(int, char **) #if defined(_WIN32) || !defined(HAVE_DLADDR) _U_ #endif @@ -560,8 +561,11 @@ init_progfile_dir(const char *arg0 * path and obviate the need for us to determine the absolute * path. */ - if (dladdr(function_addr, &info)) +DIAG_OFF(pedantic) + if (dladdr((void *)function_addr, &info)) { +DIAG_ON(pedantic) execname = info.dli_fname; + } } #endif if (execname == NULL) { |