diff --git a/src/client/refresh/files/light.c b/src/client/refresh/files/light.c index 96d03312..ac04919c 100644 --- a/src/client/refresh/files/light.c +++ b/src/client/refresh/files/light.c @@ -503,7 +503,7 @@ R_StoreLightMap(byte *dest, int stride, const byte *destmax, int smax, int tmax) if ((dest + (stride * (tmax - 1)) + smax * LIGHTMAP_BYTES) > destmax) { - Com_Error(ERR_DROP, "%s destination too small for lightmap %d > %ld", + Com_Error(ERR_DROP, "%s destination too small for lightmap %d > " YQ2_COM_PRIdS, __func__, (stride * (tmax - 1)) + smax * LIGHTMAP_BYTES, destmax - dest); } diff --git a/src/client/refresh/files/models.c b/src/client/refresh/files/models.c index 981f605e..d69fa216 100644 --- a/src/client/refresh/files/models.c +++ b/src/client/refresh/files/models.c @@ -1377,7 +1377,7 @@ Mod_LoadModel_MD3(const char *mod_name, const void *buffer, int modfilelen, if (modfilelen < sizeof(pinmodel)) { - R_Printf(PRINT_ALL, "%s: %s has incorrect header size (%i should be %ld)\n", + R_Printf(PRINT_ALL, "%s: %s has incorrect header size (%i should be " YQ2_COM_PRIdS ")\n", __func__, mod_name, modfilelen, sizeof(pinmodel)); return NULL; } @@ -1616,7 +1616,7 @@ Mod_LoadModel_MD2Anox(const char *mod_name, const void *buffer, int modfilelen, if (modfilelen < sizeof(pinmodel)) { - R_Printf(PRINT_ALL, "%s: %s has incorrect header size (%i should be %ld)\n", + R_Printf(PRINT_ALL, "%s: %s has incorrect header size (%i should be " YQ2_COM_PRIdS ")\n", __func__, mod_name, modfilelen, sizeof(pinmodel)); return NULL; } @@ -1790,7 +1790,7 @@ Mod_LoadModel_MD2(const char *mod_name, const void *buffer, int modfilelen, if (modfilelen < sizeof(pinmodel)) { - R_Printf(PRINT_ALL, "%s: %s has incorrect header size (%i should be %ld)\n", + R_Printf(PRINT_ALL, "%s: %s has incorrect header size (%i should be " YQ2_COM_PRIdS ")\n", __func__, mod_name, modfilelen, sizeof(pinmodel)); return NULL; } @@ -1952,7 +1952,7 @@ Mod_LoadSkinList_MD2(const char *mod_name, const void *buffer, int modfilelen, if (modfilelen < sizeof(pinmodel)) { - R_Printf(PRINT_ALL, "%s: %s has incorrect header size (%i should be %ld)\n", + R_Printf(PRINT_ALL, "%s: %s has incorrect header size (%i should be " YQ2_COM_PRIdS ")\n", __func__, mod_name, modfilelen, sizeof(pinmodel)); return; } diff --git a/src/client/refresh/gl1/gl1_model.c b/src/client/refresh/gl1/gl1_model.c index e88b0c98..646fc98b 100644 --- a/src/client/refresh/gl1/gl1_model.c +++ b/src/client/refresh/gl1/gl1_model.c @@ -355,8 +355,10 @@ Mod_LoadFaces(model_t *loadmodel, const byte *mod_base, const lump_t *l, loadmodel->numsurfaces = count; lminfos = Mod_LoadBSPXFindLump(bspx_header, "DECOUPLED_LM", &lminfosize, mod_base); - if (lminfos != NULL && lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces) { - R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size %ld does not match surface count %d\n", + if ((lminfos != NULL) && + (lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces)) + { + R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size " YQ2_COM_PRIdS " does not match surface count %d\n", __func__, loadmodel->name, lminfosize / sizeof(dlminfo_t), loadmodel->numsurfaces); lminfos = NULL; } @@ -481,8 +483,10 @@ Mod_LoadQFaces(model_t *loadmodel, const byte *mod_base, const lump_t *l, loadmodel->numsurfaces = count; lminfos = Mod_LoadBSPXFindLump(bspx_header, "DECOUPLED_LM", &lminfosize, mod_base); - if (lminfos != NULL && lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces) { - R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size %ld does not match surface count %d\n", + if ((lminfos != NULL) && + (lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces)) + { + R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size " YQ2_COM_PRIdS " does not match surface count %d\n", __func__, loadmodel->name, lminfosize / sizeof(dlminfo_t), loadmodel->numsurfaces); lminfos = NULL; } diff --git a/src/client/refresh/gl3/gl3_model.c b/src/client/refresh/gl3/gl3_model.c index d78bd694..c9f04611 100644 --- a/src/client/refresh/gl3/gl3_model.c +++ b/src/client/refresh/gl3/gl3_model.c @@ -356,8 +356,10 @@ Mod_LoadFaces(gl3model_t *loadmodel, const byte *mod_base, const lump_t *l, loadmodel->numsurfaces = count; lminfos = Mod_LoadBSPXFindLump(bspx_header, "DECOUPLED_LM", &lminfosize, mod_base); - if (lminfos != NULL && lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces) { - R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size %ld does not match surface count %d\n", + if ((lminfos != NULL) && + (lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces)) + { + R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size " YQ2_COM_PRIdS " does not match surface count %d\n", __func__, loadmodel->name, lminfosize / sizeof(dlminfo_t), loadmodel->numsurfaces); lminfos = NULL; } @@ -482,8 +484,10 @@ Mod_LoadQFaces(gl3model_t *loadmodel, const byte *mod_base, const lump_t *l, loadmodel->numsurfaces = count; lminfos = Mod_LoadBSPXFindLump(bspx_header, "DECOUPLED_LM", &lminfosize, mod_base); - if (lminfos != NULL && lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces) { - R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size %ld does not match surface count %d\n", + if ((lminfos != NULL) && + (lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces)) + { + R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size " YQ2_COM_PRIdS " does not match surface count %d\n", __func__, loadmodel->name, lminfosize / sizeof(dlminfo_t), loadmodel->numsurfaces); lminfos = NULL; } diff --git a/src/client/refresh/gl4/gl4_model.c b/src/client/refresh/gl4/gl4_model.c index d421f45f..2899002c 100644 --- a/src/client/refresh/gl4/gl4_model.c +++ b/src/client/refresh/gl4/gl4_model.c @@ -356,8 +356,10 @@ Mod_LoadFaces(gl4model_t *loadmodel, const byte *mod_base, const lump_t *l, loadmodel->numsurfaces = count; lminfos = Mod_LoadBSPXFindLump(bspx_header, "DECOUPLED_LM", &lminfosize, mod_base); - if (lminfos != NULL && lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces) { - R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size %ld does not match surface count %d\n", + if ((lminfos != NULL) && + (lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces)) + { + R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size " YQ2_COM_PRIdS " does not match surface count %d\n", __func__, loadmodel->name, lminfosize / sizeof(dlminfo_t), loadmodel->numsurfaces); lminfos = NULL; } @@ -482,8 +484,10 @@ Mod_LoadQFaces(gl4model_t *loadmodel, const byte *mod_base, const lump_t *l, loadmodel->numsurfaces = count; lminfos = Mod_LoadBSPXFindLump(bspx_header, "DECOUPLED_LM", &lminfosize, mod_base); - if (lminfos != NULL && lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces) { - R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size %ld does not match surface count %d\n", + if ((lminfos != NULL) && + (lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces)) + { + R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size " YQ2_COM_PRIdS " does not match surface count %d\n", __func__, loadmodel->name, lminfosize / sizeof(dlminfo_t), loadmodel->numsurfaces); lminfos = NULL; } diff --git a/src/client/refresh/vk/vk_model.c b/src/client/refresh/vk/vk_model.c index 27432f73..c260add1 100644 --- a/src/client/refresh/vk/vk_model.c +++ b/src/client/refresh/vk/vk_model.c @@ -330,8 +330,10 @@ Mod_LoadFaces(model_t *loadmodel, const byte *mod_base, const lump_t *l, loadmodel->numsurfaces = count; lminfos = Mod_LoadBSPXFindLump(bspx_header, "DECOUPLED_LM", &lminfosize, mod_base); - if (lminfos != NULL && lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces) { - R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size %ld does not match surface count %d\n", + if ((lminfos != NULL) && + (lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces)) + { + R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size " YQ2_COM_PRIdS " does not match surface count %d\n", __func__, loadmodel->name, lminfosize / sizeof(dlminfo_t), loadmodel->numsurfaces); lminfos = NULL; } @@ -456,8 +458,10 @@ Mod_LoadQFaces(model_t *loadmodel, const byte *mod_base, const lump_t *l, loadmodel->numsurfaces = count; lminfos = Mod_LoadBSPXFindLump(bspx_header, "DECOUPLED_LM", &lminfosize, mod_base); - if (lminfos != NULL && lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces) { - R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size %ld does not match surface count %d\n", + if ((lminfos != NULL) && + (lminfosize / sizeof(dlminfo_t) != loadmodel->numsurfaces)) + { + R_Printf(PRINT_ALL, "%s: [%s] decoupled_lm size " YQ2_COM_PRIdS " does not match surface count %d\n", __func__, loadmodel->name, lminfosize / sizeof(dlminfo_t), loadmodel->numsurfaces); lminfos = NULL; } diff --git a/src/common/cmodels.c b/src/common/cmodels.c index 7f4530bc..44824452 100644 --- a/src/common/cmodels.c +++ b/src/common/cmodels.c @@ -215,14 +215,14 @@ Mod_LoadValidateLumps(const char *name, const dheader_t *header) { if (header->lumps[s].filelen % rules[s]) { - Com_Printf("%s: Map %s lump #%d: incorrect size %d / %zd\n", + Com_Printf("%s: Map %s lump #%d: incorrect size %d / " YQ2_COM_PRIdS "\n", __func__, name, s, header->lumps[s].filelen, rules[s]); error = true; } #ifdef DEBUG else { - Com_Printf("%s: Map %s lump #%d: correct size %d / %zd\n", + Com_Printf("%s: Map %s lump #%d: correct size %d / " YQ2_COM_PRIdS "\n", __func__, name, s, header->lumps[s].filelen, rules[s]); } #endif diff --git a/src/common/collision.c b/src/common/collision.c index 279c7dc6..7b41cccc 100644 --- a/src/common/collision.c +++ b/src/common/collision.c @@ -1386,7 +1386,7 @@ CMod_LoadNodes(const char *name, cnode_t **map_nodes, int *numnodes, if (l->filelen % sizeof(*in)) { - Com_Error(ERR_DROP, "%s: Map %s has funny lump size %ld", + Com_Error(ERR_DROP, "%s: Map %s has funny lump size " YQ2_COM_PRIdS, __func__, name, sizeof(*in)); } @@ -1425,7 +1425,8 @@ CMod_LoadQNodes(const char *name, cnode_t **map_nodes, int *numnodes, if (l->filelen % sizeof(*in)) { - Com_Error(ERR_DROP, "%s: Map %s funny lump size %ld", __func__, name, sizeof(*in)); + Com_Error(ERR_DROP, "%s: Map %s funny lump size " YQ2_COM_PRIdS, + __func__, name, sizeof(*in)); } count = l->filelen / sizeof(*in);