Fix OS-X compiler warning

cfg.c:1024:74: warning: format specifies type 'size_t' (aka 'unsigned
long') but the argument has type 'unsigned long long'
       [-Wformat]
       fprintf(stderr, "Too large ROI size: %llu (maximum %zu).\n", size, SIZE_MAX);
This commit is contained in:
Ari Koivula 2017-02-01 18:08:46 +02:00
parent 4467506ef1
commit c7d536bbcd

View file

@ -1018,12 +1018,11 @@ int kvz_config_parse(kvz_config *cfg, const char *name, const char *value)
return 0; return 0;
} }
const long long unsigned size = (long long unsigned) width * if (width > 10000 || height > 10000) {
(long long unsigned) height; fprintf(stderr, "ROI dimensions exceed arbitrary value of 10000.\n");
if (size > SIZE_MAX) {
fprintf(stderr, "Too large ROI size: %llu (maximum %zu).\n", size, SIZE_MAX);
return 0; return 0;
} }
const unsigned size = width * height;
cfg->roi.width = width; cfg->roi.width = width;
cfg->roi.height = height; cfg->roi.height = height;