[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/8] Fix [-Werror=unused-variable] on OS/2
From: |
KO Myung-Hun |
Subject: |
[PATCH 4/8] Fix [-Werror=unused-variable] on OS/2 |
Date: |
Sun, 20 Nov 2022 23:42:53 +0900 |
* src/getopt.c (_getopt_initialize): Use statements without any effect.
* src/posixos.c (set_blocking): Declare parameters with UNUSED.
* src/remake.c (f_mtime) [__EMX__]: Declare adjustment with UNUSED.
---
src/getopt.c | 3 +++
src/posixos.c | 2 +-
src/remake.c | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/getopt.c b/src/getopt.c
index 9f31a70d..fc7cead4 100644
--- a/src/getopt.c
+++ b/src/getopt.c
@@ -436,6 +436,9 @@ _getopt_initialize (int argc, char *const *argv, const char
*optstring)
nonoption_flags_len = 0;
#endif
+ /* Make compiler happy. */
+ (void)argc; (void)argv;
+
return optstring;
}
diff --git a/src/posixos.c b/src/posixos.c
index 44aeb346..0a737521 100644
--- a/src/posixos.c
+++ b/src/posixos.c
@@ -118,7 +118,7 @@ make_job_rfd ()
}
static void
-set_blocking (int fd, int blocking)
+set_blocking (int fd UNUSED, int blocking UNUSED)
{
/* If we're not using pselect() don't change the blocking. */
#ifdef HAVE_PSELECT
diff --git a/src/remake.c b/src/remake.c
index 4ce3d2a3..2851c773 100644
--- a/src/remake.c
+++ b/src/remake.c
@@ -1470,6 +1470,7 @@ f_mtime (struct file *file, int search)
/* FAT filesystems round time to the nearest even second!
Allow for any file (NTFS or FAT) to perhaps suffer from this
brain damage. */
+ UNUSED
FILE_TIMESTAMP adjustment = (((FILE_TIMESTAMP_S (adjusted_mtime) & 1) == 0
&& FILE_TIMESTAMP_NS (adjusted_mtime) == 0)
? (FILE_TIMESTAMP) 1 << FILE_TIMESTAMP_LO_BITS
--
2.30.0
- [PATCH 0/8] Fix compilation on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 1/8] Update README.OS2, KO Myung-Hun, 2022/11/20
- [PATCH 3/8] Fix assignment of read-only location error on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 4/8] Fix [-Werror=unused-variable] on OS/2,
KO Myung-Hun <=
- [PATCH 2/8] Define a HAVE___STRCHRNUL macro properly, KO Myung-Hun, 2022/11/20
- [PATCH 5/8] Fix [-Werror=discarded-qualifiers] on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 6/8] Fix [-Werror=incompatible-pointer-types] on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 7/8] Fix [-Werror=shadow] on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 8/8] Fix [-Werror=dangling-else] on OS/2, KO Myung-Hun, 2022/11/20