solving compiler warnings

master
Steffen Pohle 2 years ago
parent a41c7566ae
commit fd623c74c3

@ -4,7 +4,7 @@ include Makefile.config
USE_VFW = 1
TARGET = $(APP).exe
CPP = g++
CPPFLAGS = -ggdb -Wall -O0 `pkg-config --cflags gtk+-3.0 gmodule-export-2.0` -Wl,--export-dynamic -DBUILD_WINDOWS=1 -Wdeprecated -D_POSIX_C_SOURCE=200112L
CPPFLAGS = -ggdb -Wall -O0 `pkg-config --cflags gtk+-3.0 gmodule-export-2.0` -Wl,--export-dynamic -DBUILD_WINDOWS=1 -Wdeprecated -D_POSIX_C_SOURCE=200112L -lucrtbase
INCLUDES =
LDFLAGS = -lws2_32 -ljpeg
LIBS = `pkg-config --libs gtk+-3.0 gmodule-export-2.0` -L/usr/lib -mwindows

@ -187,8 +187,8 @@ 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 %lu bytes for timestamps\n",
sizeof(header.DateTime) * (long)NumberOfTimeStamps);
fprintf(stderr, "Error: failed to allocate %llu bytes for timestamps\n",
(long long unsigned int) sizeof(header.DateTime) * (long)NumberOfTimeStamps);
return -1;
}
@ -246,8 +246,8 @@ int SER::appendFrame(void *data) {
while(FramePointer >= NumberOfTimeStamps)
NumberOfTimeStamps *= 2;
if((TimeStamps = (int64_t *)realloc(TimeStamps, sizeof(header.DateTime) * NumberOfTimeStamps)) == NULL) {
fprintf(stderr, "Error: failed to re-allocate %lu bytes for timestamps\n",
sizeof(header.DateTime) * (long)NumberOfTimeStamps);
fprintf(stderr, "Error: failed to re-allocate %llu bytes for timestamps\n",
(long long unsigned int) sizeof(header.DateTime) * (long)NumberOfTimeStamps);
return -1;
}
}
@ -484,7 +484,7 @@ int64_t SER::differenceLocalUTC(void) {
/* Unfortunately, GMT still has summer time. Get rid of it:*/
if (gmt_time_info.tm_isdst == 1) gmt_ts -= 3600;
fprintf(stdout, "Debug: difference between local time and UTC is %ld hours\n",
(loc_ts - gmt_ts) / 3600);
fprintf(stdout, "Debug: difference between local time and UTC is %lld hours\n",
(long long int)(loc_ts - gmt_ts) / 3600);
return ((int64_t)loc_ts - (int64_t)gmt_ts) * 10000000L;
}

Loading…
Cancel
Save