comply with -Werror

This commit is contained in:
Evgeny Zinoviev 2021-02-09 04:41:29 +03:00
parent 4f0e286870
commit 846c07f921

View File

@ -73,9 +73,14 @@ int main(int argc, char *argv[])
}
fseek(f, GPIO_BASE, SEEK_SET);
fread(&base, 2, 1, f);
size_t readed = fread(&base, 2, 1, f);
fclose(f);
if (readed < 1) {
fprintf(stderr, "error: readed %lu bytes\n", readed);
return 1;
}
base &= 0xfffe;
if (ioperm(base, 0x100, 1)) {