diff --git a/src/apng.c b/src/apng.c index a5f2485d7..6216fb347 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.cpp b/src/d_main.cpp index e1a31892d..7afb32df7 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -1306,7 +1306,8 @@ static void D_AddFile(initmultiplefilesentry_t *list, size_t index, const char * static inline void D_CleanFile(initmultiplefilesentry_t *list, size_t count) { - for (INT32 i = 0; i < count; ++i) + size_t i; + for (i = 0; i < count; ++i) { if (list[i].filename != NULL) free((void*)list[i].filename); diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 7a49edcb8..977db93b6 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -826,10 +826,9 @@ static void HWR_CreateBlendedTexture(patch_t *gpatch, patch_t *blendgpatch, GLMi } } } - } - if (translen > 0) colorbrightnesses[translen] = colorbrightnesses[translen-1]; + } if (skinnum == TC_BLINK) blendcolor = V_GetColor(skincolors[color].ramp[3]); diff --git a/src/i_tcp_detail.h b/src/i_tcp_detail.h index 9e3cccda4..b56b1c1dc 100644 --- a/src/i_tcp_detail.h +++ b/src/i_tcp_detail.h @@ -40,8 +40,6 @@ extern "C" { #include #endif -#include "doomdef.h" - #ifdef USE_WINSOCK1 #include #else @@ -115,9 +113,11 @@ extern "C" { static UINT8 UPNP_support = TRUE; #endif // HAVE_MINIUPNC -#include "d_net.h" -#include "doomtype.h" #include "i_tcp.h" +#include "d_net.h" + +#include "doomdef.h" +#include "doomtype.h" union mysockaddr_t { diff --git a/src/k_bans.cpp b/src/k_bans.cpp index 673adf0b7..a47902c21 100644 --- a/src/k_bans.cpp +++ b/src/k_bans.cpp @@ -17,10 +17,11 @@ #include #include +#include "i_tcp_detail.h" // clientaddress + #include "core/json.hpp" #include "core/string.h" #include "io/streams.hpp" -#include "i_tcp_detail.h" // clientaddress #include "k_bans.h" #include "byteptr.h" // READ/WRITE macros #include "command.h" diff --git a/src/k_kart.c b/src/k_kart.c index a6e90526c..84a88b75f 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -13882,9 +13882,10 @@ void K_MoveKartPlayer(player_t *player, boolean onground) player->itemamount--; if (player->throwdir > 0) { - mobj_t *landmine = K_ThrowKartItem(player, true, MT_LANDMINE, -1, 0, 0); + K_ThrowKartItem(player, true, MT_LANDMINE, -1, 0, 0); } - else { + else + { K_ThrowLandMine(player); } K_PlayAttackTaunt(player->mo); diff --git a/src/media/webm_vorbis_lace.cpp b/src/media/webm_vorbis_lace.cpp index 45c564419..2c45d68ca 100644 --- a/src/media/webm_vorbis_lace.cpp +++ b/src/media/webm_vorbis_lace.cpp @@ -61,7 +61,8 @@ std::vector WebmVorbisEncoder::make_vorbis_private_data() // The first byte is the number of packets. Once again, // the last packet is not counted. - v.emplace_back(std::byte {2}); + v.resize(1); + v[0] = std::byte {2}; // Then the laced sizes for each packet. lace(v, packets[0]); diff --git a/src/objects/checkpoint.cpp b/src/objects/checkpoint.cpp index 0a679e4cc..36e1eec84 100644 --- a/src/objects/checkpoint.cpp +++ b/src/objects/checkpoint.cpp @@ -495,7 +495,7 @@ struct CheckpointManager else // Checkpoint isn't in the list, find any associated tagged lines and make the pair { if (chk->linetag()) - lines_.try_emplace(chk->linetag(), std::move(tagged_lines(chk->linetag()))); + lines_.try_emplace(chk->linetag(), tagged_lines(chk->linetag())); list_.push_front(chk); count_ += 1; // Mobjlist can't have a count on it, so we keep it here }