Skip to content

Commit ebf7de1

Browse files
committed
Clean Up Build Warnings
Make the `FntPrint` function signature consistent between header and impl and and put guard around duplicate `CLAMP` macro in `libgpu/sys.c`.
1 parent 14222ec commit ebf7de1

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

include/psxsdk/libgpu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ extern int SetGraphReverse(int mode);
600600
extern int SetGraphQueue(int mode);
601601
extern u_long DrawSyncCallback(void (*func)());
602602
extern void FntLoad(int tx, int ty);
603-
int FntPrint(const char* fmt, ...);
603+
long FntPrint(long id, ...);
604604
extern void SetDispMask(int mask);
605605
extern void SetDrawMode(DR_MODE* p, int dfe, int dtd, int tpage, RECT* tw);
606606
extern void SetDumpFnt(int id);

src/main/psxsdk/libgpu/sys.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ static volatile s32* DPCR = (s32*)0x1F8010F0;
6565
static volatile s32 _qin = 0;
6666
static volatile s32 _qout = 0;
6767

68+
#ifndef CLAMP
6869
#define CLAMP(value, low, high) \
6970
value < low ? low : (value > high ? high : value)
71+
#endif
7072

7173
// gpu commands
7274
#define CMD_CLEAR_CACHE 0x01000000

src/pc/psxsdk/libgpu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ int FntOpen(int x, int y, int w, int h, int isbg, int n) { NOT_IMPLEMENTED; }
1111
void FntLoad(int tx, int ty) { NOT_IMPLEMENTED; }
1212

1313
int MyFntPrint(const char* fmt, va_list arg);
14-
int FntPrint(const char* fmt, ...) {
14+
long FntPrint(long fmt, ...) {
1515
int n;
1616
va_list args;
1717
va_start(args, fmt);
18-
n = MyFntPrint(fmt, args);
18+
n = MyFntPrint((char*) fmt, args);
1919
va_end(args);
2020
return n;
2121
}

src/pc/render_soft.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ int get_mode(int dfe, int dtd, int tpage);
2929
u32 get_ofs(s16 arg0, s16 arg1);
3030
u32 get_tw(RECT* arg0);
3131

32-
#define CLAMP(value, low, high) \
33-
value < low ? low : (value > high ? high : value)
34-
3532
u32 D_8002C26C = 0;
3633
void GPU_Init(bool pal_clock_and_tv);
3734
void GPU_StartFrameC();

0 commit comments

Comments
 (0)