SLOF/tools
Thomas Huth faa7208616 Fix remaining compiler warnings in sloffs.c
With my version of GCC (v4.8.5 - Advance-Toolchain 7.0) there are
currently two warnings when compiling sloffs.c:

sloffs.c: In function 'sloffs_dump':
sloffs.c:437:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
      printf("%04x", be16_to_cpu(*(uint16_t *)(header->date + 2)));
      ^
sloffs.c:449:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
      printf("%04x", be16_to_cpu(*(uint16_t *)(header->mdate + 2)));
      ^

These can be easily fixed by accessing the memory byte by byte instead of
casting the pointer to (uint16_t *). And while we're at it, let's also
simplify the code a little bit by consolidating the date print code
into a separate function which can be used by the two spots that print
a date.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-08-16 19:10:55 +10:00
..
.gitignore tools: added initial version of sloffs 2016-07-27 15:56:26 +10:00
Makefile tools: use crc checking code from romfs/tools 2016-07-27 15:56:26 +10:00
create_reloc_table.sh Initial import of slof-JX-1.7.0-4 2010-12-01 09:51:44 +11:00
gen_reloc_table.c Spelling fixes in comments and debug messages 2013-01-04 10:12:48 +05:30
sloffs.c Fix remaining compiler warnings in sloffs.c 2016-08-16 19:10:55 +10:00