fix some dead code issues found by tankf33der

FossilOrigin-Name: 3f6ad39437ef09616919e7a642ac235fe0042ade241220a007d6d92b8afe61ac
This commit is contained in:
crc 2019-05-28 20:26:28 +00:00
parent 1c382c6e70
commit a1281abf02
3 changed files with 9 additions and 1 deletions

View file

@ -258,6 +258,10 @@ void pass2(char *fname) {
buffer = (char *)source;
here = 0;
fp = fopen(fname, "r");
if (fp == NULL) {
printf("Unable to load file\n");
exit(2);
}
while (!feof(fp)) {
read_line(fp, buffer);
if (strcmp(buffer, "~~~") == 0) {

View file

@ -332,7 +332,7 @@ void read_token(FILE *file, char *token_buffer, int echo, int max) {
CELL ngaLoadImage(char *imageFile) {
FILE *fp;
CELL imageSize;
CELL imageSize = 0;
long fileLen;
if ((fp = fopen(imageFile, "rb")) != NULL) {
/* Determine length (in cells) */

View file

@ -133,6 +133,10 @@ void pass2(char *fname) {
buffer = (char *)source;
here = 0;
fp = fopen(fname, "r");
if (fp == NULL) {
printf("Unable to load file\n");
exit(2);
}
while (!feof(fp)) {
read_line(fp, buffer);
if (strcmp(buffer, "~~~") == 0) {