mirror of
https://git.sr.ht/~crc_/retroforth
synced 2024-11-16 19:48:56 +01:00
fix some dead code issues found by tankf33der
FossilOrigin-Name: 3f6ad39437ef09616919e7a642ac235fe0042ade241220a007d6d92b8afe61ac
This commit is contained in:
parent
1c382c6e70
commit
a1281abf02
3 changed files with 9 additions and 1 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) */
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue