Skip to content
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
4 changes: 4 additions & 0 deletions include/debugprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
#ifdef __CPPCHECK__
#include "cppcheck_stubs/stdarg.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <stdarg.h>
#endif
// cppcheck-suppress missingIncludeSystem
#include <stdio.h>

#ifdef SCR_PRINT
#ifdef __CPPCHECK__
#include "cppcheck_stubs/debug.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <debug.h>
#endif
#endif
Expand All @@ -23,6 +26,7 @@ void sio_printf(const char *fmt, ...);
#ifdef __CPPCHECK__
#include "cppcheck_stubs/SIOCookie.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <SIOCookie.h>
#endif
#define DPRINTF_INIT() ee_sio_start(38400, 0, 0, 0, 0, 1);
Expand Down
1 change: 1 addition & 0 deletions include/libcdvd_add.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifdef __CPPCHECK__
#include "cppcheck_stubs/stddef.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <stddef.h>
#endif

Expand Down
26 changes: 26 additions & 0 deletions include/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@
#define MAIN_H
#define NEWLIB_PORT_AWARE

// cppcheck-suppress missingIncludeSystem
#include <stdlib.h>
// cppcheck-suppress missingIncludeSystem
#include <stdio.h>
#ifdef __CPPCHECK__
#include "cppcheck_stubs/string.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <string.h>
#endif
// cppcheck-suppress missingIncludeSystem
#include <unistd.h>
// cppcheck-suppress missingIncludeSystem
#include <malloc.h>
// cppcheck-suppress missingIncludeSystem
#include <fcntl.h>

#ifdef __CPPCHECK__
Expand All @@ -30,19 +36,33 @@
#include "cppcheck_stubs/libmc.h"
#include "cppcheck_stubs/libcdvd.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <tamtypes.h>
// cppcheck-suppress missingIncludeSystem
#include <kernel.h>
// cppcheck-suppress missingIncludeSystem
#include <sifrpc.h>
// cppcheck-suppress missingIncludeSystem
#include <loadfile.h>
// cppcheck-suppress missingIncludeSystem
#include <debug.h>
// cppcheck-suppress missingIncludeSystem
#include <iopcontrol.h>
// cppcheck-suppress missingIncludeSystem
#include <iopheap.h>
// cppcheck-suppress missingIncludeSystem
#include <sbv_patches.h>
// cppcheck-suppress missingIncludeSystem
#include <ps2sdkapi.h>
// cppcheck-suppress missingIncludeSystem
#include <usbhdfsd-common.h>
// cppcheck-suppress missingIncludeSystem
#include <osd_config.h>
// cppcheck-suppress missingIncludeSystem
#include <libpad.h>
// cppcheck-suppress missingIncludeSystem
#include <libmc.h>
// cppcheck-suppress missingIncludeSystem
#include <libcdvd.h>
#endif

Expand All @@ -66,6 +86,7 @@
#ifdef __CPPCHECK__
#include "cppcheck_stubs/iopcontrol_special.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <iopcontrol_special.h>
#endif
#include "psx/plibcdvd_add.h"
Expand Down Expand Up @@ -127,10 +148,14 @@ void loadUDPTTY();
#include "cppcheck_stubs/io_common.h"
#include "cppcheck_stubs/libpwroff.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <hdd-ioctl.h>
// cppcheck-suppress missingIncludeSystem
#include <io_common.h>
// cppcheck-suppress missingIncludeSystem
#include <libpwroff.h>
#endif
// cppcheck-suppress missingIncludeSystem
#include <assert.h>
extern char PART[128];
extern int HDD_USABLE;
Expand All @@ -152,6 +177,7 @@ int LookForBDMDevice(void);
#ifdef __CPPCHECK__
#include "cppcheck_stubs/fileXio_rpc.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <fileXio_rpc.h>
#endif
int LoadFIO(void); // Load FileXio and it´s dependencies
Expand Down
1 change: 1 addition & 0 deletions include/psx/plibcdvd_add.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifdef __CPPCHECK__
#include "cppcheck_stubs/tamtypes.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <tamtypes.h>
#endif
/**
Expand Down
1 change: 1 addition & 0 deletions include/util.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifdef __CPPCHECK__
#include "cppcheck_stubs/stddef.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <stddef.h>
#endif

Expand Down
6 changes: 6 additions & 0 deletions include/util_safe_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,27 @@
#include "cppcheck_stubs/string.h"
#elif defined(__has_include)
#if __has_include(<stddef.h>)
// cppcheck-suppress missingIncludeSystem
#include <stddef.h>
#endif
#if __has_include(<stdarg.h>)
// cppcheck-suppress missingIncludeSystem
#include <stdarg.h>
#endif
#if __has_include(<stdint.h>)
// cppcheck-suppress missingIncludeSystem
#include <stdint.h>
#endif
#if __has_include(<limits.h>)
// cppcheck-suppress missingIncludeSystem
#include <limits.h>
#endif
#if __has_include(<string.h>)
// cppcheck-suppress missingIncludeSystem
#include <string.h>
#endif
#if __has_include(<stdio.h>)
// cppcheck-suppress missingIncludeSystem
#include <stdio.h>
#endif
#endif
Expand Down
1 change: 1 addition & 0 deletions include/util_safeio.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#if defined(__has_include)
#if __has_include(<unistd.h>)
// cppcheck-suppress missingIncludeSystem
#include <unistd.h>
#endif
#endif
Expand Down
3 changes: 3 additions & 0 deletions src/OSDConfig.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// cppcheck-suppress missingIncludeSystem
#include <stdio.h>
#ifdef __CPPCHECK__
#include "cppcheck_stubs/osd_config.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <osd_config.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/kernel.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <kernel.h>
#endif
#include "OSDInit.h"
Expand Down
10 changes: 10 additions & 0 deletions src/OSDHistory.c
Original file line number Diff line number Diff line change
@@ -1,37 +1,47 @@
// cppcheck-suppress missingIncludeSystem
#include <errno.h>
// cppcheck-suppress missingIncludeSystem
#include <fcntl.h>
// cppcheck-suppress missingIncludeSystem
#include <unistd.h>
#ifdef __CPPCHECK__
#include "cppcheck_stubs/kernel.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <kernel.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/libmc.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <libmc.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/libcdvd.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <libcdvd.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/limits.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <limits.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/string.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <string.h>
#endif
// cppcheck-suppress missingIncludeSystem
#include <stdio.h>
#include "OSDInit.h"
#include "util.h"
#include "util_safe.h"
#include "OSDHistory.h"
#include "debugprintf.h"
// cppcheck-suppress missingIncludeSystem
#include <stdlib.h>

/* The OSDs have this weird bug whereby the size of the icon file is hardcoded to 1776 bytes... even though that is way too long!
Expand Down
7 changes: 7 additions & 0 deletions src/OSDInit.c
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
// cppcheck-suppress missingIncludeSystem
#include <stdio.h>
// cppcheck-suppress missingIncludeSystem
#include <fcntl.h>
#ifdef __CPPCHECK__
#include "cppcheck_stubs/kernel.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <kernel.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/libcdvd.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <libcdvd.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/osd_config.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <osd_config.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/string.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <string.h>
#endif
#include "libcdvd_add.h"
#include "OSDInit.h"
#include "util_safe.h"
// cppcheck-suppress missingIncludeSystem
#include <unistd.h>

/* Parsing of values from the EEPROM and setting them into the EE kernel
Expand Down
10 changes: 10 additions & 0 deletions src/dvdplayer.c
Original file line number Diff line number Diff line change
@@ -1,32 +1,42 @@
// cppcheck-suppress missingIncludeSystem
#include <stdio.h>
// cppcheck-suppress missingIncludeSystem
#include <fcntl.h>
#ifdef __CPPCHECK__
#include "cppcheck_stubs/string.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <string.h>
#endif
// cppcheck-suppress missingIncludeSystem
#include <stdlib.h>
#ifdef __CPPCHECK__
#include "cppcheck_stubs/kernel.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <kernel.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/sifcmd.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <sifcmd.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/libcdvd.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <libcdvd.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/libmc.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <libmc.h>
#endif
// cppcheck-suppress missingIncludeSystem
#include <errno.h>
// cppcheck-suppress missingIncludeSystem
#include <unistd.h>

#include "dvdplayer.h"
Expand Down
6 changes: 6 additions & 0 deletions src/elf.c
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
// cppcheck-suppress missingIncludeSystem
#include <stdio.h>
// cppcheck-suppress missingIncludeSystem
#include <fcntl.h>
// cppcheck-suppress missingIncludeSystem
#include <unistd.h>
#ifdef __CPPCHECK__
#include "cppcheck_stubs/tamtypes.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <tamtypes.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/kernel.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <kernel.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/elf-loader.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <elf-loader.h>
#endif
#include "debugprintf.h"
Expand Down
5 changes: 5 additions & 0 deletions src/libcdvd_add.c
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
#ifdef __CPPCHECK__
#include "cppcheck_stubs/kernel.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <kernel.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/sifrpc.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <sifrpc.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/libcdvd.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <libcdvd.h>
#endif
#ifdef __CPPCHECK__
#include "cppcheck_stubs/string.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <string.h>
#endif
// cppcheck-suppress missingIncludeSystem
#include <stdio.h>

#include "debugprintf.h"
Expand Down
2 changes: 2 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// cppcheck-suppress missingIncludeSystem
#include <errno.h>
#ifdef __CPPCHECK__
#include "cppcheck_stubs/string.h"
#else
// cppcheck-suppress missingIncludeSystem
#include <string.h>
#endif

Expand Down
Loading