mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-14 17:01:07 +00:00
Fix code that emits -Wcalloc-transposed-args warnings
This commit is contained in:
parent
89dbfe32db
commit
a50d7f5db5
5 changed files with 5 additions and 5 deletions
|
@ -71,7 +71,7 @@ apng_create_info_struct (png_structp pngp)
|
||||||
{
|
{
|
||||||
apng_infop ainfop;
|
apng_infop ainfop;
|
||||||
(void)pngp;
|
(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_write_fn(pngp, ainfop, 0, 0, 0, 0, 0);
|
||||||
apng_set_set_acTL_fn(pngp, ainfop, 0);
|
apng_set_set_acTL_fn(pngp, ainfop, 0);
|
||||||
|
|
|
@ -1024,7 +1024,7 @@ void D_StartTitle(void)
|
||||||
#define REALLOC_FILE_LIST \
|
#define REALLOC_FILE_LIST \
|
||||||
if (list->files == NULL) \
|
if (list->files == NULL) \
|
||||||
{ \
|
{ \
|
||||||
list->files = calloc(sizeof(list->files), 2); \
|
list->files = calloc(2, sizeof(list->files)); \
|
||||||
list->numfiles = 1; \
|
list->numfiles = 1; \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
|
|
|
@ -2791,7 +2791,7 @@ void readframe(MYFILE *f, INT32 num)
|
||||||
size_t z;
|
size_t z;
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
size_t actionlen = strlen(word2) + 1;
|
size_t actionlen = strlen(word2) + 1;
|
||||||
char *actiontocompare = calloc(actionlen, 1);
|
char *actiontocompare = calloc(1, actionlen);
|
||||||
|
|
||||||
strcpy(actiontocompare, word2);
|
strcpy(actiontocompare, word2);
|
||||||
strupr(actiontocompare);
|
strupr(actiontocompare);
|
||||||
|
|
|
@ -1191,7 +1191,7 @@ boolean preparefilemenu(boolean samedepth)
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if (filenamebuf == NULL)
|
if (filenamebuf == NULL)
|
||||||
filenamebuf = calloc(sizeof(char) * MAX_WADPATH, numwadfiles);
|
filenamebuf = calloc(numwadfiles, sizeof(char) * MAX_WADPATH);
|
||||||
|
|
||||||
for (i = 0; i < numwadfiles; i++)
|
for (i = 0; i < numwadfiles; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1706,7 +1706,7 @@ static void Impl_VideoSetupBuffer(void)
|
||||||
vid.direct = NULL;
|
vid.direct = NULL;
|
||||||
if (vid.buffer)
|
if (vid.buffer)
|
||||||
free(vid.buffer);
|
free(vid.buffer);
|
||||||
vid.buffer = calloc(vid.rowbytes*vid.height, NUMSCREENS);
|
vid.buffer = calloc(NUMSCREENS, vid.rowbytes*vid.height);
|
||||||
if (!vid.buffer)
|
if (!vid.buffer)
|
||||||
{
|
{
|
||||||
I_Error("%s", M_GetText("Not enough memory for video buffer\n"));
|
I_Error("%s", M_GetText("Not enough memory for video buffer\n"));
|
||||||
|
|
Loading…
Reference in a new issue