12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- Subject: Lint fixes
- Origin: FILE5_35-2-g8d68fb4f <https://github.com/file/file/commit/FILE5_35-2-g8d68fb4f>
- Upstream-Author: Christos Zoulas <christos@zoulas.com>
- Date: Fri Oct 19 00:26:26 2018 +0000
- --- a/src/apprentice.c
- +++ b/src/apprentice.c
- @@ -293,9 +293,9 @@
-
- private off_t
- maxoff_t(void) {
- - if (sizeof(off_t) == sizeof(int))
- + if (/*CONSTCOND*/sizeof(off_t) == sizeof(int))
- return CAST(off_t, INT_MAX);
- - if (sizeof(off_t) == sizeof(long))
- + if (/*CONSTCOND*/sizeof(off_t) == sizeof(long))
- return CAST(off_t, LONG_MAX);
- return 0x7fffffff;
- }
- --- a/src/compress.c
- +++ b/src/compress.c
- @@ -422,7 +422,7 @@
- #else
- {
- int te;
- - int ou = umask(0);
- + mode_t ou = umask(0);
- tfd = mkstemp(buf);
- (void)umask(ou);
- te = errno;
- --- a/src/file.h
- +++ b/src/file.h
- @@ -382,7 +382,7 @@
- #define CCAST(T, b) const_cast<T>(b)
- #else
- #define CAST(T, b) ((T)(b))
- -#define RCAST(T, b) ((T)(b))
- +#define RCAST(T, b) ((T)(void *)(b))
- #define CCAST(T, b) ((T)(uintptr_t)(b))
- #endif
-
- --- a/src/is_json.c
- +++ b/src/is_json.c
- @@ -44,7 +44,7 @@
- #define DPRINTF(a, b, c) \
- printf("%s [%.2x/%c] %.20s\n", (a), *(b), *(b), (const char *)(c))
- #else
- -#define DPRINTF(a, b, c) (void)0
- +#define DPRINTF(a, b, c) do { } while (/*CONSTCOND*/0)
- #endif
-
- #define JSON_ARRAY 0
|