diff --git a/src/apng.c b/src/apng.c index 11d3ab9f58ea9c26530374b7b18d8454fd367ed8..cfb1473a40269703985bc727cafd5f27f2c14f02 100644 --- a/src/apng.c +++ b/src/apng.c @@ -71,7 +71,7 @@ apng_create_info_struct (png_structp pngp) { apng_infop ainfop; (void)pngp; - if (( ainfop = calloc(sizeof (apng_info),1) )) + if (( ainfop = calloc(1,sizeof (apng_info)) )) { apng_set_write_fn(pngp, ainfop, 0, 0, 0, 0, 0); apng_set_set_acTL_fn(pngp, ainfop, 0); diff --git a/src/d_main.c b/src/d_main.c index 2405b01365ba8c47f4e54036839e7e704b6aaa4b..3a3a0b26a3ee5213ef7bffb7cd881079e20bea22 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1024,7 +1024,7 @@ void D_StartTitle(void) #define REALLOC_FILE_LIST \ if (list->files == NULL) \ { \ - list->files = calloc(sizeof(list->files), 2); \ + list->files = calloc(2, sizeof(list->files)); \ list->numfiles = 1; \ } \ else \ diff --git a/src/deh_soc.c b/src/deh_soc.c index dda3b2ef4b31352b1579623421cdc2733da56585..3759cc9c7552987029edcc8f6c1e76322ef61ed3 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -2791,7 +2791,7 @@ void readframe(MYFILE *f, INT32 num) size_t z; boolean found = false; size_t actionlen = strlen(word2) + 1; - char *actiontocompare = calloc(actionlen, 1); + char *actiontocompare = calloc(1, actionlen); strcpy(actiontocompare, word2); strupr(actiontocompare); diff --git a/src/filesrch.c b/src/filesrch.c index 3a729a9c80ee4b80e7b1bcff9385f631651694d1..ea19e00cdc0abd38d3fd1b869751faad316b0b83 100644 --- a/src/filesrch.c +++ b/src/filesrch.c @@ -1191,7 +1191,7 @@ boolean preparefilemenu(boolean samedepth) size_t i; if (filenamebuf == NULL) - filenamebuf = calloc(sizeof(char) * MAX_WADPATH, numwadfiles); + filenamebuf = calloc(numwadfiles, sizeof(char) * MAX_WADPATH); for (i = 0; i < numwadfiles; i++) { diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index ee48fa2b154568889c50d4e0a6c8d97c5c2a7bf0..99425108e69b3761fd03de7790d02232e44bb898 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -33,8 +33,6 @@ target_compile_options(SRB2SDL2 PRIVATE -Wall -Wno-trigraphs -W # Was controlled by RELAXWARNINGS - -pedantic - -Wpedantic -Wfloat-equal -Wundef -Wpointer-arith diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 249be61f69dd054824e6a21b755130226ccb4957..10c866a1e32ff6dd3c8ac248fb50df2a4e3a30f6 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -1706,7 +1706,7 @@ static void Impl_VideoSetupBuffer(void) vid.direct = NULL; if (vid.buffer) free(vid.buffer); - vid.buffer = calloc(vid.rowbytes*vid.height, NUMSCREENS); + vid.buffer = calloc(NUMSCREENS, vid.rowbytes*vid.height); if (!vid.buffer) { I_Error("%s", M_GetText("Not enough memory for video buffer\n"));