From a4f82cdc371261cbedefa6df320c64b61d6ad743 Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Wed, 22 Dec 2021 21:46:58 +0000
Subject: [PATCH] (key.c,utilunix.c,ftpfs_parse_ls.c) remove unused macros
key.c:223: warning: macro "MC_MSEC_PER_SEC" is not used []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-macros-Wunused-macros]8;;]
223 | #define MC_MSEC_PER_SEC 1000
utilunix.c:85: warning: macro "MAX_PIPE_SIZE" is not used []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-macros-Wunused-macros]8;;]
85 | #define MAX_PIPE_SIZE 4096
ftpfs_parse_ls.c:66: warning: macro "NO_DATE_YET" is not used []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-macros-Wunused-macros]8;;]
66 | #define NO_DATE_YET ((time_t) (-2L))
|
ftpfs_parse_ls.c:64: warning: macro "NO_SIZE_YET" is not used []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-macros-Wunused-macros]8;;]
64 | #define NO_SIZE_YET ((off_t) (-2L))
|
ftpfs_parse_ls.c:60: warning: macro "HOUR" is not used []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-macros-Wunused-macros]8;;]
60 | #define HOUR (60 * MINUTE)
|
ftpfs_parse_ls.c:59: warning: macro "MINUTE" is not used []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-macros-Wunused-macros]8;;]
59 | #define MINUTE (60)
|
ftpfs_parse_ls.c:61: warning: macro "DAY" is not used []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-macros-Wunused-macros]8;;]
61 | #define DAY (24 * HOUR)
|
Found by gcc 11
Signed-off-by: Andreas Mohr <and@gmx.li>
---
lib/tty/key.c | 1 -
lib/utilunix.c | 4 ----
src/vfs/ftpfs/ftpfs_parse_ls.c | 6 ------
3 files changed, 11 deletions(-)
diff --git a/lib/tty/key.c b/lib/tty/key.c
index 7651da999..930e086df 100644
a
|
b
|
const key_code_name_t key_name_conv_tab[] = { |
220 | 220 | |
221 | 221 | /*** file scope macro definitions ****************************************************************/ |
222 | 222 | |
223 | | #define MC_MSEC_PER_SEC 1000 |
224 | 223 | #define MC_USEC_PER_MSEC 1000 |
225 | 224 | |
226 | 225 | /* The maximum sequence length (32 + null terminator) */ |
diff --git a/lib/utilunix.c b/lib/utilunix.c
index f8d4dc366..3f4e14781 100644
a
|
b
|
struct sigaction startup_handler; |
80 | 80 | #define UID_CACHE_SIZE 200 |
81 | 81 | #define GID_CACHE_SIZE 30 |
82 | 82 | |
83 | | /* Pipes are guaranteed to be able to hold at least 4096 bytes */ |
84 | | /* More than that would be unportable */ |
85 | | #define MAX_PIPE_SIZE 4096 |
86 | | |
87 | 83 | /*** file scope type declarations ****************************************************************/ |
88 | 84 | |
89 | 85 | typedef struct |
diff --git a/src/vfs/ftpfs/ftpfs_parse_ls.c b/src/vfs/ftpfs/ftpfs_parse_ls.c
index 595131600..f452f3e4b 100644
a
|
b
|
|
56 | 56 | |
57 | 57 | #define number_of_parsers 7 |
58 | 58 | |
59 | | #define MINUTE (60) |
60 | | #define HOUR (60 * MINUTE) |
61 | | #define DAY (24 * HOUR) |
62 | | |
63 | 59 | #define NO_SIZE ((off_t) (-1L)) |
64 | | #define NO_SIZE_YET ((off_t) (-2L)) |
65 | 60 | #define NO_DATE ((time_t) (-1L)) |
66 | | #define NO_DATE_YET ((time_t) (-2L)) |
67 | 61 | |
68 | 62 | #define FIRST_TOKEN strtok (line, " \t") |
69 | 63 | #define NEXT_TOKEN strtok (NULL, " \t") |