From 4b7da20a2de9b8dcd266e2d69b13259cb364d451 Mon Sep 17 00:00:00 2001 From: negativeExponent Date: Sat, 23 May 2020 12:09:11 +0800 Subject: Silence some warnings Silences some [-Wformat-truncation=] and [-Wstringop-truncation] --- libpcsxcore/misc.c | 2 +- libpcsxcore/psxcounters.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'libpcsxcore') diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c index d877513..d42576c 100644 --- a/libpcsxcore/misc.c +++ b/libpcsxcore/misc.c @@ -392,7 +392,7 @@ int CheckCdrom() { } if (CdromLabel[0] == ' ') { - strncpy(CdromLabel, CdromId, 9); + memcpy(CdromLabel, CdromId, 9); } SysPrintf(_("CD-ROM Label: %.32s\n"), CdromLabel); SysPrintf(_("CD-ROM ID: %.9s\n"), CdromId); diff --git a/libpcsxcore/psxcounters.c b/libpcsxcore/psxcounters.c index 35823da..bebec87 100644 --- a/libpcsxcore/psxcounters.c +++ b/libpcsxcore/psxcounters.c @@ -64,7 +64,9 @@ static const u32 HSyncTotal[] = { 263, 313 }; #define VBlankStart 240 #define VERBOSE_LEVEL 0 +#if VERBOSE_LEVEL > 0 static const s32 VerboseLevel = VERBOSE_LEVEL; +#endif /******************************************************************************/ -- cgit v1.2.3