Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix sdl2_compat build #2173

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions setup/multiplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#include "d_iwad.h"
#include "doomdef.h"
Expand Down Expand Up @@ -506,7 +507,7 @@
++num_iwads;
}

iwad_labels = malloc(sizeof(*iwad_labels) * num_iwads);

Check warning on line 510 in setup/multiplayer.c

View workflow job for this annotation

GitHub Actions / Clang-Tidy

setup/multiplayer.c:510:19 [clang-analyzer-optin.portability.UnixAPI]

Call to 'malloc' has an allocation size of 0 bytes

for (i=0; i < num_iwads; ++i)
{
Expand Down
2 changes: 2 additions & 0 deletions src/i_endoom.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
// Exit text-mode ENDOOM screen.
//

#include <string.h>

#include "doomtype.h"
#include "i_printf.h"
#include "i_video.h"
Expand Down
6 changes: 4 additions & 2 deletions src/i_flickstick.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
//
//----------------------------------------------------------------------------

#include "g_game.h"
#include <math.h>
#include <string.h>

#include "i_flickstick.h"
#include "doomstat.h"
#include "i_gamepad.h"
#include "i_input.h"
#include "m_config.h"

#define MAX_F 0.999999f
Expand Down
1 change: 1 addition & 0 deletions src/i_gamepad.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "SDL.h"

#include <math.h>
#include <string.h>

#include "g_game.h"
#include "i_flickstick.h"
Expand Down
2 changes: 2 additions & 0 deletions src/i_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include "SDL.h"

#include <string.h>

#include "d_event.h"
#include "d_main.h"
#include "doomkeys.h"
Expand Down
2 changes: 2 additions & 0 deletions src/i_pcsound.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "al.h"
#include "alext.h"

#include <string.h>

#include "doomstat.h"
#include "doomtype.h"
#include "i_oalcommon.h"
Expand Down
1 change: 0 additions & 1 deletion src/i_rumble.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "m_config.h"
#include "p_mobj.h"
#include "sounds.h"
#include "w_wad.h"

#define MAX_RUMBLE_COUNT 4
#define MAX_RUMBLE_SDL 0xFFFF
Expand Down
1 change: 1 addition & 0 deletions src/i_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "SDL.h"

#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>

Expand Down
3 changes: 3 additions & 0 deletions src/mn_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
// GNU General Public License for more details.
//

#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <string.h>

#include "hu_command.h"
Expand Down
1 change: 1 addition & 0 deletions src/st_stuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
//
//-----------------------------------------------------------------------------

#include <math.h>
#include <stdlib.h>

#include "am_map.h"
Expand Down
1 change: 1 addition & 0 deletions textscreen/txt_fileselect.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// Routines for selecting files.
//

#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down