1234567891011121314151617181920212223242526272829303132333435363738 |
- Subject: More lint fixes
- Origin: FILE5_35-3-gc7d910ee <https://github.com/file/file/commit/FILE5_35-3-gc7d910ee>
- Upstream-Author: Christos Zoulas <christos@zoulas.com>
- Date: Fri Oct 19 00:33:04 2018 +0000
- --- 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)(void *)(b))
- +#define RCAST(T, b) ((T)(uintptr_t)(b))
- #define CCAST(T, b) ((T)(uintptr_t)(b))
- #endif
-
- --- a/src/readelf.c
- +++ b/src/readelf.c
- @@ -786,7 +786,7 @@
- pidoff = argoff + 81 + 2;
- if (doff + pidoff + 4 <= size) {
- if (file_printf(ms, ", pid=%u",
- - elf_getu32(swap, *RCAST(uint32 *, (nbuf +
- + elf_getu32(swap, *RCAST(uint32_t *, (nbuf +
- doff + pidoff)))) == -1)
- return 1;
- }
- --- a/src/softmagic.c
- +++ b/src/softmagic.c
- @@ -1435,7 +1435,7 @@
- if ((size_t)-m->offset > b->elen)
- return -1;
- buffer_init(bb, -1, b->ebuf, b->elen);
- - ms->eoffset = ms->offset = b->elen + m->offset;
- + ms->eoffset = ms->offset = (int32_t)(b->elen + m->offset);
- } else {
- if (cont_level == 0) {
- normal:
|