chars are unlike ints, etc.: their "default" signedness is undefined #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
plain char can be unsigned as well as signed (it is implementation-dependent);
discovered by compilation warning:
outbase.c:226:6: warning: comparison is always true due to limited range of data type [-Wtype-limits]
if (i < length - 1 && str[i + 1] >= 0 && str[i + 1] <= 7)
^
modified: elftoc/outbase.h, elftoc/outbase.c, elftoc/out.c
second commit fixes ELF version check in header; with wrong check, you will get "warning: unrecognized ELF header version: 2." on big-endian machine (ELFDATA2MSB = 2, and EV_NUM = 2 too)