mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Fix warnings unearthed by #579
This commit is contained in:
parent
99d4ab0b71
commit
0ccee6c87b
@ -10,7 +10,7 @@
|
||||
|
||||
#if defined HAVE_OPENAL && HAVE_OPENAL
|
||||
|
||||
soundtouch::SoundTouch soundTouch;
|
||||
static soundtouch::SoundTouch soundTouch;
|
||||
|
||||
//
|
||||
// AyuanX: Spec says OpenAL1.1 is thread safe already
|
||||
|
@ -297,7 +297,7 @@ static void point_add(u8 *r, const u8 *p, const u8 *q)
|
||||
elt_add(ry, s, rx);
|
||||
}
|
||||
|
||||
void point_mul(u8 *d, const u8 *a, const u8 *b) // a is bignum
|
||||
static void point_mul(u8 *d, const u8 *a, const u8 *b) // a is bignum
|
||||
{
|
||||
u32 i;
|
||||
u8 mask;
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
void point_mul(u8 *d, const u8 *a, const u8 *b);
|
||||
|
||||
void generate_ecdsa(u8 *R, u8 *S, const u8 *k, const u8 *hash);
|
||||
|
||||
void ec_priv_to_pub(const u8 *k, u8 *Q);
|
||||
|
@ -139,11 +139,6 @@ void DisplayMessage(const std::string& message, int time_in_ms)
|
||||
}
|
||||
}
|
||||
|
||||
static void Callback_DebuggerBreak()
|
||||
{
|
||||
CCPU::Break();
|
||||
}
|
||||
|
||||
void *GetWindowHandle()
|
||||
{
|
||||
return g_pWindowHandle;
|
||||
|
@ -167,13 +167,6 @@ static char *skip_spaces(char *ptr)
|
||||
return ptr;
|
||||
}
|
||||
|
||||
static const char *skip_spaces(const char *ptr)
|
||||
{
|
||||
while (*ptr == ' ')
|
||||
ptr++;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// Parse a standalone value - it can be a number in one of several formats or a label.
|
||||
s32 DSPAssembler::ParseValue(const char *str)
|
||||
{
|
||||
|
@ -46,36 +46,6 @@ void HLE_GeneralDebugPrint()
|
||||
NOTICE_LOG(OSREPORT, "%08x->%08x| %s", LR, PC, ReportMessage.c_str());
|
||||
}
|
||||
|
||||
static void HLE_VPrintf()
|
||||
{
|
||||
std::string ReportMessage;
|
||||
u32 r4 = GPR(4);
|
||||
u32 offset = Memory::Read_U32(r4+8);
|
||||
u32 check = Memory::Read_U32(r4);
|
||||
//NOTICE_LOG(OSREPORT, "Offset: %08X, Check %08X", offset, check);
|
||||
for (int i = 4; i<= 10; i++)
|
||||
{
|
||||
GPR(i) = Memory::Read_U32(offset+(i-(check == 0x01000000? 3 : 2))*4);
|
||||
//NOTICE_LOG(OSREPORT, "r%d: %08X",i, GPR(i));
|
||||
}
|
||||
|
||||
GetStringVA(ReportMessage);
|
||||
|
||||
NPC = LR;
|
||||
|
||||
NOTICE_LOG(OSREPORT, "%08x->%08x| %s", LR, PC, ReportMessage.c_str());
|
||||
}
|
||||
// Generalized func for just printing string pointed to by r3.
|
||||
static void HLE_GeneralDebugPrintWithInt()
|
||||
{
|
||||
std::string ReportMessage;
|
||||
GetStringVA(ReportMessage, 5);
|
||||
NPC = LR;
|
||||
|
||||
//PanicAlert("(%08x->%08x) %s", LR, PC, ReportMessage.c_str());
|
||||
NOTICE_LOG(OSREPORT, "%08x->%08x| %s", LR, PC, ReportMessage.c_str());
|
||||
}
|
||||
|
||||
// __write_console is slightly abnormal
|
||||
void HLE_write_console()
|
||||
{
|
||||
|
@ -75,11 +75,6 @@ Symbol *DSPSymbolDB::GetSymbolFromAddr(u32 addr)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static void DisassembleRange(u16 start, u16 end)
|
||||
{
|
||||
// TODO: ?
|
||||
}
|
||||
|
||||
bool ReadAnnotatedAssembly(const std::string& filename)
|
||||
{
|
||||
File::IOFile f(filename, "r");
|
||||
|
@ -155,9 +155,4 @@ void FastWrite64(const u64 _iValue)
|
||||
m_gatherPipeCount += 8;
|
||||
}
|
||||
|
||||
static void FastWriteEnd()
|
||||
{
|
||||
CheckGatherPipe();
|
||||
}
|
||||
|
||||
} // end of namespace GPFifo
|
||||
|
@ -139,11 +139,6 @@ u32 GetTicksPerSecond()
|
||||
return CPU_CORE_CLOCK;
|
||||
}
|
||||
|
||||
static u32 ConvertMillisecondsToTicks(u32 _Milliseconds)
|
||||
{
|
||||
return GetTicksPerSecond() / 1000 * _Milliseconds;
|
||||
}
|
||||
|
||||
// DSP/CPU timeslicing.
|
||||
static void DSPCallback(u64 userdata, int cyclesLate)
|
||||
{
|
||||
|
@ -116,27 +116,6 @@ void make_blanksig_ec_cert(u8 *cert_out, const char *signer, const char *name, c
|
||||
ec_priv_to_pub(private_key, cert_out + 0x108);
|
||||
}
|
||||
|
||||
|
||||
// get_shared_secret
|
||||
|
||||
// shared_secret_out is a pointer to 0x3c long buffer
|
||||
// remote_public_key is a pointer to the remote party's public key (0x3c bytes)
|
||||
// NG_priv is the device-unique private key to use
|
||||
// if NG_priv is nullptr, default builtin will be used
|
||||
static void get_shared_secret(u8* shared_secret_out, u8* remote_public_key, u8* NG_priv)
|
||||
{
|
||||
if (NG_priv==nullptr)
|
||||
{
|
||||
NG_priv = default_NG_priv;
|
||||
}
|
||||
|
||||
// required point_mul in Source/Core/Common/Crypto/ec.cpp
|
||||
// to be made non-static
|
||||
|
||||
point_mul(shared_secret_out, NG_priv, remote_public_key);
|
||||
|
||||
}
|
||||
|
||||
EcWii::EcWii()
|
||||
{
|
||||
bool init = true;
|
||||
|
@ -30,8 +30,6 @@ void get_ng_cert(u8* ng_cert_out, u32 NG_id, u32 NG_key_id, const u8* NG_priv, c
|
||||
void get_ap_sig_and_cert(u8 *sig_out, u8 *ap_cert_out, u64 title_id, u8 *data, u32 data_size, const u8 *NG_priv, u32 NG_id);
|
||||
|
||||
void make_blanksig_ec_cert(u8 *cert_out, const char *signer, const char *name, const u8 *private_key, u32 key_id);
|
||||
void get_shared_secret(u8* shared_secret_out, u8* remote_public_key, const u8* NG_priv);
|
||||
|
||||
|
||||
|
||||
class EcWii
|
||||
|
@ -23,24 +23,6 @@
|
||||
namespace EMM
|
||||
{
|
||||
|
||||
#if (defined __APPLE__ || defined __linux__ || defined __FreeBSD__) && !defined(ANDROID)
|
||||
#include <execinfo.h>
|
||||
static void print_trace(const char * msg)
|
||||
{
|
||||
void *array[100];
|
||||
size_t size;
|
||||
char **strings;
|
||||
size_t i;
|
||||
|
||||
size = backtrace(array, 100);
|
||||
strings = backtrace_symbols(array, size);
|
||||
printf("%s Obtained %u stack frames.\n", msg, (unsigned int)size);
|
||||
for (i = 0; i < size; i++)
|
||||
printf("--> %s\n", strings[i]);
|
||||
free(strings);
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool DoFault(u64 bad_address, SContext *ctx)
|
||||
{
|
||||
if (!JitInterface::IsInCodeSpace((u8*) ctx->CTX_PC))
|
||||
|
@ -181,11 +181,6 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool operator < (const GameListItem &one, const GameListItem &other)
|
||||
{
|
||||
return CompareGameListItems(&one, &other) < 0;
|
||||
}
|
||||
|
||||
BEGIN_EVENT_TABLE(wxEmuStateTip, wxTipWindow)
|
||||
EVT_KEY_DOWN(wxEmuStateTip::OnKeyDown)
|
||||
END_EVENT_TABLE()
|
||||
|
@ -163,6 +163,7 @@ static void ApplySSAASettings() {
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
static void GLAPIENTRY ErrorCallback( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char* message, const void* userParam)
|
||||
{
|
||||
const char *s_source;
|
||||
@ -196,6 +197,7 @@ static void GLAPIENTRY ErrorCallback( GLenum source, GLenum type, GLuint id, GLe
|
||||
default: ERROR_LOG(VIDEO, "id: %x, source: %s, type: %s - %s", id, s_source, s_type, message); break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Two small Fallbacks to avoid GL_ARB_ES2_compatibility
|
||||
static void GLAPIENTRY DepthRangef(GLfloat neardepth, GLfloat fardepth)
|
||||
|
@ -63,11 +63,6 @@ std::string VideoSoftware::GetName() const
|
||||
return _trans("Software Renderer");
|
||||
}
|
||||
|
||||
static void *DllDebugger(void *_hParent, bool Show)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void VideoSoftware::ShowConfig(void *_hParent)
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
|
@ -252,11 +252,6 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
||||
}
|
||||
}
|
||||
|
||||
static bool AllowIdleSkipping()
|
||||
{
|
||||
return !SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread || (!m_Control.PETokenEnable && !m_Control.PEFinishEnable);
|
||||
}
|
||||
|
||||
void UpdateInterrupts()
|
||||
{
|
||||
// check if there is a token-interrupt
|
||||
|
@ -349,30 +349,6 @@ static void WriteRGB5A3Encoder(char*& p,API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
static void WriteRGBA4443Encoder(char*& p,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_TF_RGB5A3, ApiType);
|
||||
|
||||
WRITE(p, " float4 texSample;\n");
|
||||
WRITE(p, " float4 color0;\n");
|
||||
WRITE(p, " float4 color1;\n");
|
||||
|
||||
WriteSampleColor(p, "rgba", "texSample", 0, ApiType);
|
||||
WriteToBitDepth(p, 3, "texSample.a", "color0.b");
|
||||
WriteToBitDepth(p, 4, "texSample.r", "color1.b");
|
||||
WriteToBitDepth(p, 4, "texSample.g", "color0.g");
|
||||
WriteToBitDepth(p, 4, "texSample.b", "color1.g");
|
||||
|
||||
WriteSampleColor(p, "rgba", "texSample", 1, ApiType);
|
||||
WriteToBitDepth(p, 3, "texSample.a", "color0.r");
|
||||
WriteToBitDepth(p, 4, "texSample.r", "color1.r");
|
||||
WriteToBitDepth(p, 4, "texSample.g", "color0.a");
|
||||
WriteToBitDepth(p, 4, "texSample.b", "color1.a");
|
||||
|
||||
WRITE(p, " ocol0 = (color0 * 16.0 + color1) / 255.0;\n");
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
static void WriteRGBA8Encoder(char*& p,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_TF_RGBA8, ApiType);
|
||||
|
@ -560,6 +560,7 @@ static void decodeDXTBlock(u32 *dst, const DXTBlock *src, int pitch)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CHECK
|
||||
static void decodeDXTBlockRGBA(u32 *dst, const DXTBlock *src, int pitch)
|
||||
{
|
||||
// S3TC Decoder (Note: GCN decodes differently from PC so we can't use native support)
|
||||
@ -602,6 +603,7 @@ static void decodeDXTBlockRGBA(u32 *dst, const DXTBlock *src, int pitch)
|
||||
dst += pitch;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0 // TODO - currently does not handle transparency correctly and causes problems when texture dimensions are not multiples of 8
|
||||
static void copyDXTBlock(u8* dst, const u8* src)
|
||||
|
Loading…
Reference in New Issue
Block a user