Fix build warnings. config.h for flac

This commit is contained in:
Flyinghead 2019-07-28 18:49:59 +02:00
parent 9791ebebce
commit 1fffbad9fc
8 changed files with 35 additions and 46 deletions

View File

@ -126,7 +126,7 @@ endif
ifdef CHD5_FLAC
RZDCY_CFLAGS += -DCHD5_FLAC -I$(RZDCY_SRC_DIR)/deps/flac/src/libFLAC/include/ -I$(RZDCY_SRC_DIR)/deps/flac/include
RZDCY_CFLAGS += -DPACKAGE_VERSION=\"1.3.2\" -DFLAC__HAS_OGG=0 -DFLAC__NO_DLL -DHAVE_LROUND -DHAVE_STDINT_H -DHAVE_STDLIB_H -DHAVE_SYS_PARAM_H
RZDCY_CFLAGS += -DHAVE_CONFIG_H
RZDCY_MODULES += deps/flac/src/libFLAC/
endif

View File

@ -0,0 +1,10 @@
#define PACKAGE_VERSION "1.3.2"
#define FLAC__HAS_OGG 0
#define FLAC__NO_DLL 1
#define HAVE_LROUND 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#ifndef _MSC_VER
#define HAVE_SYS_PARAM_H 1
#endif

View File

@ -8,6 +8,10 @@
#ifndef ZCONF_H
#define ZCONF_H
#ifndef _MSC_VER
#define HAVE_UNISTD_H 1
#endif
/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.

View File

@ -273,7 +273,6 @@ sh4dec(i0000_0000_0001_1011)
/*
sh4dec(i0100_nnnn_0000_0111)
{
/*
u32 sr_t;
ReadMemU32(sr_t,r[n]);
if (sh4_exept_raised)
@ -284,7 +283,7 @@ sh4dec(i0100_nnnn_0000_0111)
{
//FIXME only if interrupts got on .. :P
UpdateINTC();
}* /
}
dec_End(0xFFFFFFFF,BET_StaticIntr,false);
}
*/

View File

@ -120,7 +120,7 @@ public:
AllocDestReg(op->rd);
AllocDestReg(op->rd2);
}
ssa_printf("%08x %s gregs %ld fregs %ld", block->vaddr + op->guest_offs, op->dissasm().c_str(), host_gregs.size(), host_fregs.size());
ssa_printf("%08x %s gregs %zd fregs %zd", block->vaddr + op->guest_offs, op->dissasm().c_str(), host_gregs.size(), host_fregs.size());
}
void OpEnd(shil_opcode* op)

View File

@ -536,7 +536,7 @@ void ngen_Binary(shil_opcode* op, BinaryOP dtop, BinaryOPImm dtopimm)
dtop(reg.mapg(op->rd), rs1, rs2, CC_AL);
}
void ngen_fp_bin(shil_opcode* op, const FPBinOP fpop)
void ngen_fp_bin(shil_opcode* op, FPBinOP fpop)
{
eFSReg rs1 = f0;
if (op->rs1.is_imm())
@ -563,7 +563,7 @@ void ngen_fp_bin(shil_opcode* op, const FPBinOP fpop)
fpop(reg.mapfs(op->rd), rs1, rs2, CC_AL);
}
void ngen_fp_una(shil_opcode* op, const FPUnOP fpop)
void ngen_fp_una(shil_opcode* op, FPUnOP fpop)
{
verify(op->rd.is_r32f());
verify(op->rs1.is_r32f());
@ -894,7 +894,7 @@ u32* ngen_readm_fail_v2(u32* ptrv,u32* regs,u32 fault_addr)
if (offs==-1)
{
ERROR_LOG(DYNAREC, "%08X : invalid size", ptr[0]);
ERROR_LOG(DYNAREC, "%08X : invalid size", fop);
die("can't decode opcode\n");
}
@ -1875,7 +1875,7 @@ void ngen_compile_opcode(RuntimeBlockInfo* block, shil_opcode* op, bool staging,
case shop_fmul:
case shop_fdiv:
{
const FPBinOP* opcds[]= { VADD_VFP,VSUB_VFP,VMUL_VFP,VDIV_VFP };
FPBinOP* opcds[] = { VADD_VFP, VSUB_VFP, VMUL_VFP, VDIV_VFP };
ngen_fp_bin(op, opcds[op->op-shop_fadd]);
}
break;
@ -1883,7 +1883,7 @@ void ngen_compile_opcode(RuntimeBlockInfo* block, shil_opcode* op, bool staging,
case shop_fabs:
case shop_fneg:
{
const FPUnOP* opcds[]= { VABS_VFP,VNEG_VFP};
FPUnOP* opcds[] = { VABS_VFP, VNEG_VFP };
ngen_fp_una(op, opcds[op->op-shop_fabs]);
}
break;
@ -2472,7 +2472,7 @@ void ngen_init()
BX(LR);
}
INFO_LOG(DYNAREC, "readm helpers: up to %08X", EMIT_GET_PTR());
INFO_LOG(DYNAREC, "readm helpers: up to %p", EMIT_GET_PTR());
emit_SetBaseAddr();

View File

@ -2599,13 +2599,7 @@
CHD5_LZMA,
_7ZIP_ST,
CHD5_FLAC,
"PACKAGE_VERSION=\\\"1.3.2\\\"",
"FLAC__HAS_OGG=0",
FLAC__NO_DLL,
HAVE_LROUND,
HAVE_STDINT_H,
HAVE_STDLIB_H,
HAVE_SYS_PARAM_H,
"HAVE_CONFIG_H=1",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@ -2656,13 +2650,7 @@
CHD5_LZMA,
_7ZIP_ST,
CHD5_FLAC,
"PACKAGE_VERSION=\\\"1.3.2\\\"",
"FLAC__HAS_OGG=0",
FLAC__NO_DLL,
HAVE_LROUND,
HAVE_STDINT_H,
HAVE_STDLIB_H,
HAVE_SYS_PARAM_H,
"HAVE_CONFIG_H=1",
RELEASE,
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@ -2821,13 +2809,7 @@
CHD5_LZMA,
_7ZIP_ST,
CHD5_FLAC,
"PACKAGE_VERSION=\\\"1.3.2\\\"",
"FLAC__HAS_OGG=0",
FLAC__NO_DLL,
HAVE_LROUND,
HAVE_STDINT_H,
HAVE_STDLIB_H,
HAVE_SYS_PARAM_H,
"HAVE_CONFIG_H=1",
"${CFLAGS}",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
@ -2938,13 +2920,7 @@
CHD5_LZMA,
_7ZIP_ST,
CHD5_FLAC,
"PACKAGE_VERSION=\\\"1.3.2\\\"",
"FLAC__HAS_OGG=0",
FLAC__NO_DLL,
HAVE_LROUND,
HAVE_STDINT_H,
HAVE_STDLIB_H,
HAVE_SYS_PARAM_H,
"HAVE_CONFIG_H=1",
RELEASE,
"${CFLAGS}",
);

View File

@ -713,7 +713,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Full</Optimization>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;PACKAGE_VERSION="1.3.2";FLAC__HAS_OGG=0;FLAC__NO_DLL;HAVE_LROUND;HAVE_STDINT_H;HAVE_STDLIB_H;CHD5_LZMA;_7ZIP_ST;NDEBUG;_CONSOLE;X86;RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;HAVE_CONFIG_H=1;CHD5_LZMA;_7ZIP_ST;NDEBUG;_CONSOLE;X86;RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\core\;$(ProjectDir)..\core\khronos;$(ProjectDir)..\core\rend\gles;$(ProjectDir)..\core\deps;$(ProjectDir)..\core\deps\flac\src\libflac\include;$(ProjectDir)..\core\deps\flac\include</AdditionalIncludeDirectories>
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
@ -752,7 +752,7 @@ for /f "delims=" %%i in ('date /T') do echo #define BUILD_DATE "%%i" &gt;&gt;$(P
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Full</Optimization>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;PACKAGE_VERSION="1.3.2";FLAC__HAS_OGG=0;FLAC__NO_DLL;HAVE_LROUND;HAVE_STDINT_H;HAVE_STDLIB_H;CHD5_LZMA;_7ZIP_ST;NDEBUG;_CONSOLE;X86;RELEASE;TARGET_NAOMI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;HAVE_CONFIG_H=1;CHD5_LZMA;_7ZIP_ST;NDEBUG;_CONSOLE;X86;RELEASE;TARGET_NAOMI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\core\;$(ProjectDir)..\core\khronos;$(ProjectDir)..\core\rend\gles;$(ProjectDir)..\core\deps;$(ProjectDir)..\core\deps\flac\src\libflac\include;$(ProjectDir)..\core\deps\flac\include</AdditionalIncludeDirectories>
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
@ -791,7 +791,7 @@ for /f "delims=" %%i in ('date /T') do echo #define BUILD_DATE "%%i" &gt;&gt;$(P
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Full</Optimization>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;PACKAGE_VERSION="1.3.2";FLAC__HAS_OGG=0;FLAC__NO_DLL;HAVE_LROUND;HAVE_STDINT_H;HAVE_STDLIB_H;CHD5_LZMA;_7ZIP_ST;NDEBUG;_CONSOLE;X86;RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;HAVE_CONFIG_H=1;CHD5_LZMA;_7ZIP_ST;NDEBUG;_CONSOLE;X86;RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\core\;$(ProjectDir)..\core\khronos;$(ProjectDir)..\core\rend\gles;$(ProjectDir)..\core\deps;$(ProjectDir)..\core\deps\flac\src\libflac\include;$(ProjectDir)..\core\deps\flac\include</AdditionalIncludeDirectories>
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
@ -832,7 +832,7 @@ for /f "delims=" %%i in ('date /T') do echo #define BUILD_DATE "%%i" &gt;&gt;$(P
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Full</Optimization>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;PACKAGE_VERSION="1.3.2";FLAC__HAS_OGG=0;FLAC__NO_DLL;HAVE_LROUND;HAVE_STDINT_H;HAVE_STDLIB_H;CHD5_LZMA;_7ZIP_ST;NDEBUG;_CONSOLE;X86;RELEASE;TARGET_NAOMI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;HAVE_CONFIG_H=1;CHD5_LZMA;_7ZIP_ST;NDEBUG;_CONSOLE;X86;RELEASE;TARGET_NAOMI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\core\;$(ProjectDir)..\core\khronos;$(ProjectDir)..\core\rend\gles;$(ProjectDir)..\core\deps;$(ProjectDir)..\core\deps\flac\src\libflac\include;$(ProjectDir)..\core\deps\flac\include</AdditionalIncludeDirectories>
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
@ -873,7 +873,7 @@ for /f "delims=" %%i in ('date /T') do echo #define BUILD_DATE "%%i" &gt;&gt;$(P
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;PACKAGE_VERSION="1.3.2";FLAC__HAS_OGG=0;FLAC__NO_DLL;HAVE_LROUND;HAVE_STDINT_H;HAVE_STDLIB_H;CHD5_LZMA;_7ZIP_ST;_DEBUG;_CONSOLE;X86;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;HAVE_CONFIG_H=1;CHD5_LZMA;_7ZIP_ST;_DEBUG;_CONSOLE;X86;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\core\;$(ProjectDir)..\core\khronos;$(ProjectDir)..\core\rend\gles;$(ProjectDir)..\core\deps;$(ProjectDir)..\core\deps\flac\src\libflac\include;$(ProjectDir)..\core\deps\flac\include</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
@ -901,7 +901,7 @@ for /f "delims=" %%i in ('date /T') do echo #define BUILD_DATE "%%i" &gt;&gt;$(P
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;PACKAGE_VERSION="1.3.2";FLAC__HAS_OGG=0;FLAC__NO_DLL;HAVE_LROUND;HAVE_STDINT_H;HAVE_STDLIB_H;CHD5_LZMA;_7ZIP_ST;_DEBUG;_CONSOLE;X86;TARGET_NAOMI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;HAVE_CONFIG_H=1;CHD5_LZMA;_7ZIP_ST;_DEBUG;_CONSOLE;X86;TARGET_NAOMI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\core\;$(ProjectDir)..\core\khronos;$(ProjectDir)..\core\rend\gles;$(ProjectDir)..\core\deps;$(ProjectDir)..\core\deps\flac\src\libflac\include;$(ProjectDir)..\core\deps\flac\include</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
@ -929,7 +929,7 @@ for /f "delims=" %%i in ('date /T') do echo #define BUILD_DATE "%%i" &gt;&gt;$(P
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;PACKAGE_VERSION="1.3.2";FLAC__HAS_OGG=0;FLAC__NO_DLL;HAVE_LROUND;HAVE_STDINT_H;HAVE_STDLIB_H;CHD5_LZMA;_7ZIP_ST;_DEBUG;_CONSOLE;X86;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;HAVE_CONFIG_H=1;CHD5_LZMA;_7ZIP_ST;_DEBUG;_CONSOLE;X86;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\core\;$(ProjectDir)..\core\khronos;$(ProjectDir)..\core\rend\gles;$(ProjectDir)..\core\deps;$(ProjectDir)..\core\deps\flac\src\libflac\include;$(ProjectDir)..\core\deps\flac\include</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
@ -960,7 +960,7 @@ for /f "delims=" %%i in ('date /T') do echo #define BUILD_DATE "%%i" &gt;&gt;$(P
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;PACKAGE_VERSION="1.3.2";FLAC__HAS_OGG=0;FLAC__NO_DLL;HAVE_LROUND;HAVE_STDINT_H;HAVE_STDLIB_H;CHD5_LZMA;_7ZIP_ST;_DEBUG;_CONSOLE;X86;TARGET_NAOMI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;CHD5_FLAC;HAVE_CONFIG_H=1;CHD5_LZMA;_7ZIP_ST;_DEBUG;_CONSOLE;X86;TARGET_NAOMI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\core\;$(ProjectDir)..\core\khronos;$(ProjectDir)..\core\rend\gles;$(ProjectDir)..\core\deps;$(ProjectDir)..\core\deps\flac\src\libflac\include;$(ProjectDir)..\core\deps\flac\include</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>