From 676e4732be3059eb0d8aaf3e719fa99061debc29 Mon Sep 17 00:00:00 2001 From: Frode Solheim Date: Sat, 12 Jul 2014 15:30:12 +0200 Subject: [PATCH] build68k.cpp: minor changes, reduce compiler warnings --- build68k.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/build68k.cpp b/build68k.cpp index be6ed1a6..57ee2515 100644 --- a/build68k.cpp +++ b/build68k.cpp @@ -6,6 +6,9 @@ * Copyright 1995,1996 Bernd Schmidt */ +#include "sysconfig.h" +#include "sysdeps.h" + #include #include #include @@ -13,10 +16,6 @@ #define TCHAR char -#include "sysconfig.h" -#include "sysdeps.h" - - #include "readcpu.h" static FILE *tablef; @@ -227,7 +226,9 @@ int main(int argc, char **argv) if (nextch != ':') abort(); - fgets(opcstr, 250, tablef); + if (fgets(opcstr, 250, tablef) != opcstr) { + abort(); + } getnextch(); if (nextch == '-') { @@ -268,7 +269,9 @@ int main(int argc, char **argv) nextch = fgetc (tablef); } if (nextch == ' ') { - fgets(fm, sizeof fm, tablef); + if (fgets(fm, sizeof fm, tablef) != fm) { + abort(); + } if (!strnicmp(fm, "fea", 3)) fetchmode = 1; if (!strnicmp(fm, "cea", 3)) -- 2.47.3