mountlist: suppress unused label warning on FreeBSD

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
This commit is contained in:
Yury V. Zaytsev 2024-10-26 18:06:58 +02:00
parent 58f75eeb2e
commit 61909fa24e
3 changed files with 8 additions and 1 deletions

View File

@ -66,6 +66,7 @@ ax_gcc_func_attribute_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS= _AC_LANG_PREFIX[]FLAGS=
AX_GCC_FUNC_ATTRIBUTE([fallthrough]) AX_GCC_FUNC_ATTRIBUTE([fallthrough])
AX_GCC_FUNC_ATTRIBUTE([weak]) AX_GCC_FUNC_ATTRIBUTE([weak])
AX_GCC_FUNC_ATTRIBUTE([unused])
_AC_LANG_PREFIX[]FLAGS=$ax_gcc_func_attribute_save_flags _AC_LANG_PREFIX[]FLAGS=$ax_gcc_func_attribute_save_flags
unset ax_gcc_func_attribute_save_flags unset ax_gcc_func_attribute_save_flags

View File

@ -50,6 +50,12 @@
#define MC_FALLTHROUGH #define MC_FALLTHROUGH
#endif #endif
#ifdef HAVE_FUNC_ATTRIBUTE_UNUSED
#define MC_UNUSED __attribute__((unused))
#else
#define MC_UNUSED
#endif
#ifdef USE_MAINTAINER_MODE #ifdef USE_MAINTAINER_MODE
#include "lib/logging.h" #include "lib/logging.h"
#endif #endif

View File

@ -1215,7 +1215,7 @@ read_file_system_list (void)
return g_slist_reverse (mount_list); return g_slist_reverse (mount_list);
free_then_fail: free_then_fail: MC_UNUSED;
{ {
int saved_errno = errno; int saved_errno = errno;