Skip to content

Commit

Permalink
mountlist: suppress unused label warning on FreeBSD
Browse files Browse the repository at this point in the history
Signed-off-by: Yury V. Zaytsev <[email protected]>
  • Loading branch information
zyv committed Oct 26, 2024
1 parent e3fcc2c commit 66a020c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ ax_gcc_func_attribute_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS=
AX_GCC_FUNC_ATTRIBUTE([fallthrough])
AX_GCC_FUNC_ATTRIBUTE([weak])
AX_GCC_FUNC_ATTRIBUTE([unused])
_AC_LANG_PREFIX[]FLAGS=$ax_gcc_func_attribute_save_flags
unset ax_gcc_func_attribute_save_flags

Expand Down
6 changes: 6 additions & 0 deletions lib/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
#define MC_FALLTHROUGH
#endif

#ifdef HAVE_FUNC_ATTRIBUTE_UNUSED
#define MC_UNUSED __attribute__((unused))
#else
#define MC_UNUSED
#endif

#ifdef USE_MAINTAINER_MODE
#include "lib/logging.h"
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/filemanager/mountlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ read_file_system_list (void)

return g_slist_reverse (mount_list);

free_then_fail:
free_then_fail: MC_UNUSED;
{
int saved_errno = errno;

Expand Down

0 comments on commit 66a020c

Please sign in to comment.