Remove warnings about ISO C++11 conformance

This commit is contained in:
np511 2017-01-29 04:27:43 -05:00
parent 696510d220
commit de6216b37b
19 changed files with 31 additions and 28 deletions

View File

@ -126,7 +126,7 @@ extern "C" {
u32 CALLBACK PS2EgetLibType(void);
u32 CALLBACK PS2EgetLibVersion2(u32 type);
char *CALLBACK PS2EgetLibName(void);
const char *CALLBACK PS2EgetLibName(void);
#ifdef __cplusplus
}

View File

@ -27,7 +27,7 @@ const unsigned char version = PS2E_CDVD_VERSION;
const unsigned char revision = 0;
const unsigned char build = 6;
EXPORT_C_(char *)
EXPORT_C_(const char *)
PS2EgetLibName()
{
snprintf(libraryName, 255, "CDVDnull Driver %lld%s", SVN_REV, SVN_MODS ? "m" : "");

View File

@ -66,7 +66,7 @@ PS2EgetLibType()
return PS2E_LT_FW;
}
EXPORT_C_(char *)
EXPORT_C_(const char *)
PS2EgetLibName()
{
snprintf(libraryName, 255, "FWnull Driver %lld%s", SVN_REV, SVN_MODS ? "m" : "");

View File

@ -35,7 +35,6 @@ const unsigned char version = PS2E_GS_VERSION;
const unsigned char revision = 0;
const unsigned char build = 1; // increase that with each version
static char libraryName[256];
Config conf;
u32 GSKeyEvent = 0;
bool GSShift = false, GSAlt = false;
@ -62,7 +61,11 @@ PS2EgetLibType()
return PS2E_LT_GS;
}
EXPORT_C_(char *)
#ifdef _MSC_VER
static char libraryName[256];
#endif
EXPORT_C_(const char *)
PS2EgetLibName()
{
#ifdef _MSC_VER

View File

@ -81,8 +81,8 @@ namespace GSLog
{
extern bool Open();
extern void Close();
extern void Log(char *fmt, ...);
extern void Message(char *fmt, ...);
extern void Log(const char *fmt, ...);
extern void Message(const char *fmt, ...);
extern void Print(const char *fmt, ...);
extern void WriteLn(const char *fmt, ...);
};

View File

@ -63,7 +63,7 @@ void Close()
}
}
void Log(char *fmt, ...)
void Log(const char *fmt, ...)
{
va_list list;
@ -75,7 +75,7 @@ void Log(char *fmt, ...)
va_end(list);
}
void Message(char *fmt, ...)
void Message(const char *fmt, ...)
{
va_list list;
char msg[512];

View File

@ -23,7 +23,7 @@ using namespace std;
const u8 version = PS2E_PAD_VERSION;
const u8 revision = 0;
const u8 build = 1; // increase that with each version
const u8 build = 1; // increase that with each version
#ifdef _MSC_VER
#define snprintf sprintf_s
@ -43,7 +43,7 @@ PS2EgetLibType()
return PS2E_LT_PAD;
}
EXPORT_C_(char *)
EXPORT_C_(const char *)
PS2EgetLibName()
{
snprintf(libraryName, 255, "Padnull Driver %lld%s", SVN_REV, SVN_MODS ? "m" : "");

View File

@ -36,9 +36,9 @@ const u32 minor = 0; // increase that with each version
#define RELEASE_MS 437L
#ifdef PCSX2_DEBUG
char *libraryName = "SPU2null (Debug)";
const char *libraryName = "SPU2null (Debug)";
#else
char *libraryName = "SPU2null ";
const char *libraryName = "SPU2null ";
#endif
string s_strIniPath = "inis/";
string s_strLogPath = "logs/";
@ -89,7 +89,7 @@ PS2EgetLibType()
return PS2E_LT_SPU2;
}
EXPORT_C_(char *)
EXPORT_C_(const char *)
PS2EgetLibName()
{
return libraryName;
@ -101,7 +101,7 @@ PS2EgetLibVersion2(u32 type)
return (version << 16) | (revision << 8) | build | (minor << 24);
}
void __Log(char *fmt, ...)
void __Log(const char *fmt, ...)
{
va_list list;

View File

@ -48,7 +48,7 @@ extern const u8 version;
extern const u8 revision;
extern const u8 build;
extern const u32 minor;
extern char *libraryName;
extern const char *libraryName;
typedef struct
{
@ -57,7 +57,7 @@ typedef struct
extern Config conf;
void __Log(char *fmt, ...);
void __Log(const char *fmt, ...);
void SaveConfig();
void LoadConfig();
void SysMessage(char *fmt, ...);

View File

@ -60,7 +60,7 @@ PS2EgetLibType()
return PS2E_LT_USB;
}
EXPORT_C_(char *)
EXPORT_C_(const char *)
PS2EgetLibName()
{
snprintf(libraryName, 255, "USBnull Driver %lld%s", SVN_REV, SVN_MODS ? "m" : "");

View File

@ -113,7 +113,7 @@ u32 CALLBACK PS2EgetLibType() {
return PS2E_LT_USB;
}
char* CALLBACK PS2EgetLibName()
const char* CALLBACK PS2EgetLibName()
{
InitLibraryName();
return libraryName;

View File

@ -60,7 +60,7 @@ const unsigned char version = PS2E_CDVD_VERSION;
const unsigned char revision = 0;
const unsigned char build = 11;
EXPORT char *CALLBACK PS2EgetLibName()
EXPORT const char *CALLBACK PS2EgetLibName()
{
return LibName;
}

View File

@ -72,7 +72,7 @@ u32 CALLBACK PS2EgetLibType() {
return PS2E_LT_DEV9;
}
char* CALLBACK PS2EgetLibName() {
const char* CALLBACK PS2EgetLibName() {
return libraryName;
}

View File

@ -77,7 +77,7 @@ PS2EgetLibType()
return PS2E_LT_DEV9;
}
EXPORT_C_(char *)
EXPORT_C_(const char *)
PS2EgetLibName()
{
snprintf(libraryName, 255, "DEV9null Driver %lld%s", SVN_REV, SVN_MODS ? "m" : "");

View File

@ -91,7 +91,7 @@ PS2EgetLibType()
return PS2E_LT_PAD;
}
EXPORT_C_(char *)
EXPORT_C_(const char *)
PS2EgetLibName()
{
InitLibraryName();

View File

@ -105,7 +105,7 @@ u32 CALLBACK PS2EgetLibType() {
return PS2E_LT_GS;
}
char* CALLBACK PS2EgetLibName() {
const char* CALLBACK PS2EgetLibName() {
return libraryName;
}

View File

@ -97,7 +97,7 @@ u32 CALLBACK PS2EgetLibType() {
return PS2E_LT_GS;
}
char* CALLBACK PS2EgetLibName() {
const char* CALLBACK PS2EgetLibName() {
return libraryName;
}

View File

@ -162,7 +162,7 @@ u32 CALLBACK PS2EgetLibType()
return PS2E_LT_SPU2;
}
char* CALLBACK PS2EgetLibName()
const char* CALLBACK PS2EgetLibName()
{
InitLibraryName();
return libraryName;

View File

@ -97,9 +97,9 @@ EXPORT_C_(u32) PS2EgetLibType()
return PS2E_LT_GS;
}
EXPORT_C_(char*) PS2EgetLibName()
EXPORT_C_(const char*) PS2EgetLibName()
{
return (char*) libraryName;
return libraryName;
}
EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)