Enable -Wpedantic

Fix a few warnings related needed to build the source with this option.

Add new exception to .checkpatch.conf.

Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
Antonio Niño Díaz
2018-04-01 00:47:35 +01:00
parent 4d13d57491
commit b28a16c0da
5 changed files with 10 additions and 5 deletions

View File

@@ -147,10 +147,13 @@ void opt_Parse(char *s)
case 'z':
if (strlen(&s[1]) <= 2) {
int32_t result;
unsigned int fillchar;
result = sscanf(&s[1], "%x", &newopt.fillchar);
result = sscanf(&s[1], "%x", &fillchar);
if (!((result == EOF) || (result == 1)))
errx(1, "Invalid argument for option 'z'");
newopt.fillchar = fillchar;
} else {
errx(1, "Invalid argument for option 'z'");
}