Skip to content

Commit 909d147

Browse files
Merge pull request #82 from NathanNeurotic/codex/audit-include-statements-for-missing-system-includes
Add Cppcheck stub headers for PS2SDK includes
2 parents 7871961 + b6f04be commit 909d147

50 files changed

Lines changed: 564 additions & 25 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codacy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ engines:
1515
- cppcheck-suppressions.txt
1616
exclude_paths:
1717
- src/util_safeio.c
18+
- include/cppcheck_stubs/**

include/cppcheck_stubs/SIOCookie.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#pragma once
2+
// Stub for Codacy/Cppcheck static analysis; not used in PS2SDK builds.
3+
4+
int ee_sio_start(int baudrate, int mode, int parity, int stop, int ctrl, int intr);

include/cppcheck_stubs/ctype.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#pragma once
2+
// Stub for Codacy/Cppcheck static analysis; not used in PS2SDK builds.
3+
4+
int isspace(int c);

include/cppcheck_stubs/debug.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#pragma once
2+
// Stub for Codacy/Cppcheck static analysis; not used in PS2SDK builds.
3+
4+
int scr_printf(const char *fmt, ...);
5+
void scr_setfontcolor(int color);
6+
void scr_setbgcolor(int color);
7+
void scr_clear(void);
8+
void scr_setCursor(int cursor);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#pragma once
2+
// Stub for Codacy/Cppcheck static analysis; not used in PS2SDK builds.
3+
4+
int LoadELFFromFile(const char *filename, int argc, const char *argv[]);
5+
int LoadELFFromFileWithPartition(const char *filename, const char *partition, int argc, const char *argv[]);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#pragma once
2+
// Stub for Codacy/Cppcheck static analysis; not used in PS2SDK builds.
3+
4+
int fileXioInit(void);
5+
int fileXioDopen(const char *path);
6+
int fileXioDclose(int fd);
7+
int fileXioIoctl(int fd, int cmd, void *arg);
8+
int fileXioDevctl(const char *name, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
9+
int fileXioMount(const char *mnt, const char *dev, int flag);
10+
int fileXioUmount(const char *mnt);

include/cppcheck_stubs/hdd-ioctl.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#pragma once
2+
// Stub for Codacy/Cppcheck static analysis; not used in PS2SDK builds.
3+
4+
#ifndef HDIOC_STATUS
5+
#define HDIOC_STATUS 0
6+
#endif
7+
8+
#ifndef HDIOC_SMARTSTAT
9+
#define HDIOC_SMARTSTAT 0
10+
#endif
11+
12+
#ifndef HDIOC_GETSECTORERROR
13+
#define HDIOC_GETSECTORERROR 0
14+
#endif
15+
16+
#ifndef HDIOC_GETERRORPARTNAME
17+
#define HDIOC_GETERRORPARTNAME 0
18+
#endif

include/cppcheck_stubs/io_common.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#pragma once
2+
// Stub for Codacy/Cppcheck static analysis; not used in PS2SDK builds.
3+
4+
#ifndef FIO_MT_RDONLY
5+
#define FIO_MT_RDONLY 0
6+
#endif
7+
8+
#ifndef PDIOC_CLOSEALL
9+
#define PDIOC_CLOSEALL 0
10+
#endif
11+
12+
#ifndef DDIOC_OFF
13+
#define DDIOC_OFF 0
14+
#endif
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#pragma once
2+
// Stub for Codacy/Cppcheck static analysis; not used in PS2SDK builds.
3+
4+
int SifIopReset(const char *arg, int mode);
5+
int SifIopSync(void);
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#pragma once
2+
// Stub for Codacy/Cppcheck static analysis; not used in PS2SDK builds.
3+
4+
int SifIopRebootBuffer(const void *ioprp, int size);

0 commit comments

Comments
 (0)