clean up all compile warnings.

test16bit
Steffen Pohle 3 years ago
parent 0e0638ec21
commit 3b44f3ae66

@ -32,6 +32,9 @@ SER::SER() {
FileDesc = NULL;
Frame = NULL;
FramePointer = 0;
FrameSize = 0;
NumberOfPlanes = 0;
BytesPerPixel = 0;
Reading = 1;
NumberOfTimeStamps = 0;
TimeStamps = NULL;
@ -184,7 +187,7 @@ int SER::writeHeader(void) {
}
/* allocate some memory for the upcoming timestamps */
if((TimeStamps = (int64_t *)malloc(sizeof(header.DateTime) * NumberOfTimeStamps)) == NULL) {
fprintf(stderr, "Error: failed to allocate %d bytes for timestamps\n",
fprintf(stderr, "Error: failed to allocate %lu bytes for timestamps\n",
sizeof(header.DateTime) * NumberOfTimeStamps);
return -1;
}
@ -242,7 +245,7 @@ int SER::appendFrame(void *data) {
if(FramePointer >= NumberOfTimeStamps) {
NumberOfTimeStamps *= 2;
if((TimeStamps = (int64_t *)realloc(TimeStamps, sizeof(header.DateTime) * NumberOfTimeStamps)) == NULL) {
fprintf(stderr, "Error: failed to re-allocate %d bytes for timestamps\n",
fprintf(stderr, "Error: failed to re-allocate %lu bytes for timestamps\n",
sizeof(header.DateTime) * NumberOfTimeStamps);
return -1;
}
@ -341,7 +344,7 @@ void * SER::allocFrame(void) {
/* Try allocating new frame data. */
if((Frame = malloc(FrameSize)) == NULL) {
fprintf(stderr, "Error: failed to allocate %d bytes for frame\n", FrameSize);
fprintf(stderr, "Error: failed to allocate %lu bytes for frame\n", FrameSize);
return NULL;
}
return Frame;

Loading…
Cancel
Save