aboutsummaryrefslogtreecommitdiff
path: root/gcc/m2/mc-boot/GFIO.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/m2/mc-boot/GFIO.c')
-rw-r--r--gcc/m2/mc-boot/GFIO.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/gcc/m2/mc-boot/GFIO.c b/gcc/m2/mc-boot/GFIO.c
index 1ae6bb6..4a6056f 100644
--- a/gcc/m2/mc-boot/GFIO.c
+++ b/gcc/m2/mc-boot/GFIO.c
@@ -555,7 +555,7 @@ static FIO_File GetNextFreeDescriptor (void)
return f; /* create new slot */
}
}
- ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/FIO.def", 25, 1);
+ ReturnException ("../../gcc/m2/gm2-libs/FIO.def", 25, 1);
__builtin_unreachable ();
}
@@ -726,7 +726,7 @@ static int ReadFromBuffer (FIO_File f, void * a, unsigned int nBytes)
(*p) = static_cast<unsigned char> ((*fd->buffer->contents).array[fd->buffer->position]);
fd->buffer->left -= 1; /* remove consumed bytes */
fd->buffer->position += 1; /* move onwards n bytes */
- nBytes = 0; /* reduce the amount for future direct */
+ nBytes = 0;
/* read */
return 1;
}
@@ -821,7 +821,6 @@ static int BufferedRead (FIO_File f, unsigned int nBytes, void * a)
if (f != Error)
{
- /* avoid dangling else. */
fd = static_cast<FIO_FileDescriptor> (Indexing_GetIndice (FileInfo, f));
total = 0; /* how many bytes have we read */
if (fd != NULL) /* how many bytes have we read */
@@ -891,16 +890,9 @@ static int BufferedRead (FIO_File f, unsigned int nBytes, void * a)
}
return total;
}
- else
- {
- return -1;
- }
}
}
- else
- {
- return -1;
- }
+ return -1;
/* static analysis guarentees a RETURN statement will be used before here. */
__builtin_unreachable ();
}
@@ -2266,7 +2258,8 @@ extern "C" void * FIO_getFileName (FIO_File f)
return fd->name.address;
}
}
- ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/FIO.def", 25, 1);
+ return NULL;
+ /* static analysis guarentees a RETURN statement will be used before here. */
__builtin_unreachable ();
}
@@ -2293,7 +2286,8 @@ extern "C" unsigned int FIO_getFileNameLength (FIO_File f)
return fd->name.size;
}
}
- ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/FIO.def", 25, 1);
+ return 0;
+ /* static analysis guarentees a RETURN statement will be used before here. */
__builtin_unreachable ();
}