mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
Fix some cases of variables being used uninitialized. Also some unused
variables, writeable strings and dangerously shadowed variables. index(), gamma(), exp() and y0() are POSIX functions and using those names can cause namespace confusion. A number of C files were missing the final newline required by ANSI C and some versions of GCC are pedantic enough to complain about this. These changes simply the scons build, allowing us to get rid of filterWarnings which is simply more trouble than it's worth. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5574 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -17,5 +17,4 @@ if env['HAVE_WX']:
|
||||
|
||||
|
||||
env_inputpc = env.Clone()
|
||||
env_inputpc.Append(CXXFLAGS = [ '-fPIC' ])
|
||||
env_inputpc.StaticLibrary(env['local_libs'] + "inputplugincommon", files)
|
||||
|
@ -46,4 +46,4 @@ void CConfig::Save()
|
||||
ac_Config.Set(file);
|
||||
|
||||
file.Save((std::string(File::GetUserPath(D_CONFIG_IDX)) + "DSP.ini").c_str());
|
||||
}
|
||||
}
|
||||
|
@ -79,11 +79,11 @@ void CMailHandler::DoState(PointerWrap &p)
|
||||
if (p.GetMode() == PointerWrap::MODE_READ)
|
||||
{
|
||||
Clear();
|
||||
int sz;
|
||||
int sz = 0;
|
||||
p.Do(sz);
|
||||
for (int i = 0; i < sz; i++)
|
||||
{
|
||||
u32 mail;
|
||||
u32 mail = 0;
|
||||
p.Do(mail);
|
||||
m_Mails.push(mail);
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ if dspenv['HAVE_WX']:
|
||||
]
|
||||
|
||||
dspenv.Append(
|
||||
CXXFLAGS = [ '-fPIC' ],
|
||||
LIBS = [ 'common', 'audiocommon' ],
|
||||
)
|
||||
if sys.platform == 'darwin':
|
||||
|
@ -26,12 +26,10 @@ if env['HAVE_WX']:
|
||||
lleenv = env.Clone()
|
||||
if env['HAVE_WX']:
|
||||
lleenv.Append(
|
||||
CXXFLAGS = [ '-fPIC' ],
|
||||
LIBS = [ 'dspcore', 'audiocommon', 'common', 'debugger_ui_util' ],
|
||||
)
|
||||
else:
|
||||
lleenv.Append(
|
||||
CXXFLAGS = [ '-fPIC' ],
|
||||
LIBS = [ 'dspcore', 'audiocommon', 'common' ],
|
||||
)
|
||||
if sys.platform == 'darwin':
|
||||
|
@ -178,4 +178,4 @@ void DoState(unsigned char **ptr, int mode)
|
||||
} // Recording
|
||||
|
||||
|
||||
#endif // RERECORDING
|
||||
#endif // RERECORDING
|
||||
|
@ -151,4 +151,4 @@ void SetInterlacingMode(const BPCmd &bp)
|
||||
// TODO
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
@ -140,4 +140,4 @@ int GetNumAdapters();
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -31,4 +31,4 @@ namespace D3D
|
||||
// Utility functions
|
||||
LPDIRECT3DVERTEXSHADER9 CompileAndCreateVertexShader(const char *code, int len);
|
||||
LPDIRECT3DPIXELSHADER9 CompileAndCreatePixelShader(const char *code, int len);
|
||||
}
|
||||
}
|
||||
|
@ -465,4 +465,4 @@ void DListCache::Cleanup()
|
||||
SETSTAT(stats.numDListsAlive,(int)dlists.size());
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -69,4 +69,4 @@ public:
|
||||
static void Call(u32 _addr, u32 _size);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -17,4 +17,4 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
void DlgSettings_Show(HINSTANCE hInstance, HWND parent);
|
||||
void DlgSettings_Show(HINSTANCE hInstance, HWND parent);
|
||||
|
@ -519,4 +519,4 @@ const XFBSource** FramebufferManager::getVirtualXFBSource(u32 xfbAddr, u32 fbWid
|
||||
}
|
||||
|
||||
return &m_overlappingXFBArray[0];
|
||||
}
|
||||
}
|
||||
|
@ -28,4 +28,4 @@
|
||||
// A global plugin specification
|
||||
extern PLUGIN_GLOBALS* globals;
|
||||
|
||||
#endif // _GLOBALS_H_
|
||||
#endif // _GLOBALS_H_
|
||||
|
@ -170,4 +170,4 @@ void D3DVertexFormat::SetupVertexPointers() const
|
||||
D3D::SetVertexDeclaration(d3d_decl);
|
||||
else
|
||||
ERROR_LOG(VIDEO, "invalid d3d decl");
|
||||
}
|
||||
}
|
||||
|
@ -81,4 +81,4 @@ struct RGBAFloat
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -86,4 +86,4 @@ public:
|
||||
static void CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, bool bIsIntensityFmt, u32 copyfmt, int bScaleByHalf, const EFBRectangle &source_rect);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -145,4 +145,4 @@ namespace W32Util
|
||||
{
|
||||
Write(&i,sizeof(char));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -58,4 +58,4 @@ namespace W32Util
|
||||
}
|
||||
|
||||
|
||||
#endif //__LAMEFILE_H__
|
||||
#endif //__LAMEFILE_H__
|
||||
|
@ -99,4 +99,4 @@ namespace W32Util
|
||||
CloseClipboard();
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,4 +6,4 @@ namespace W32Util
|
||||
HBITMAP CreateBitmapFromARGB(HWND someHwnd, DWORD *image, int w, int h);
|
||||
void NiceSizeFormat(size_t size, char * out);
|
||||
BOOL CopyTextToClipboard(HWND hwnd, char * text);
|
||||
}
|
||||
}
|
||||
|
@ -224,4 +224,4 @@ namespace W32Util
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,4 +84,4 @@ namespace W32Util
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -12,4 +12,4 @@ namespace W32Util
|
||||
std::string& _strFileName);
|
||||
std::vector<std::string> BrowseForFileNameMultiSelect(bool _bLoad, HWND _hParent, const char *_pTitle,
|
||||
const char *_pInitialFolder,const char *_pFilter,const char *_pExtension);
|
||||
}
|
||||
}
|
||||
|
@ -79,4 +79,4 @@ namespace W32Util
|
||||
if (_handle != NULL)
|
||||
SuspendThread(_handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,4 +27,4 @@ void XFUpdatePJ();
|
||||
void LoadXFReg(u32 transferSize, u32 address, u32 *pData);
|
||||
void LoadIndexedXF(u32 val, int array);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -24,4 +24,4 @@ int write_u_long_int ( unsigned long int u_long_int_val, FILE *fileout );
|
||||
int write_u_short_int ( unsigned short int u_short_int_val, FILE *fileout );
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -15,4 +15,4 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "stdafx.h"
|
||||
|
@ -25,8 +25,7 @@ files = [
|
||||
'PostProcessing.cpp',
|
||||
'FramebufferManager.cpp',
|
||||
]
|
||||
compileFlags = [
|
||||
'-fPIC',
|
||||
compileFlags = [
|
||||
]
|
||||
linkFlags = [
|
||||
]
|
||||
|
@ -15,4 +15,4 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "stdafx.h"
|
||||
|
@ -226,7 +226,7 @@ inline void CalculateLOD(s32 &lod, bool &linear, u32 texmap, u32 texcoord)
|
||||
bias >>= 1;
|
||||
lod += bias;
|
||||
|
||||
linear = (lod > 0 && (tm0.min_filter & 4) || lod <= 0 && tm0.mag_filter);
|
||||
linear = ((lod > 0 && (tm0.min_filter & 4)) || (lod <= 0 && tm0.mag_filter));
|
||||
|
||||
// order of checks matters
|
||||
// should be:
|
||||
|
@ -36,9 +36,6 @@ files = [
|
||||
'VideoConfig.cpp',
|
||||
'XFMemLoader.cpp',
|
||||
]
|
||||
compileFlags = [
|
||||
'-fPIC',
|
||||
]
|
||||
linkFlags = [
|
||||
]
|
||||
libs = [
|
||||
@ -56,7 +53,7 @@ conf = gfxenv.Configure(custom_tests = tests,
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
gfxenv['FRAMEWORKS'] = ['CoreFoundation', 'System', 'OpenGL', 'Cocoa', 'Cg']
|
||||
compileFlags += ['-x','objective-c++',]
|
||||
compileFlags = ['-x','objective-c++',]
|
||||
files += [ 'cocoaGL.m', ]
|
||||
|
||||
conf.CheckPKG('OpenGL')
|
||||
@ -94,7 +91,6 @@ if gfxenv['USE_WX'] and not gfxenv['HAVE_WX']:
|
||||
print "Must have wx to use wxgl"
|
||||
Return()
|
||||
gfxenv.Append(
|
||||
CXXFLAGS = compileFlags,
|
||||
LINKFLAGS = linkFlags,
|
||||
)
|
||||
|
||||
|
@ -15,4 +15,4 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "stdafx.h"
|
||||
|
@ -30,8 +30,7 @@ if wmenv['HAVE_WX']:
|
||||
]
|
||||
libs = [ 'common', 'inputcommon' ]
|
||||
|
||||
|
||||
cxxflags = [ '-fPIC' ]
|
||||
cxxflags = [ ]
|
||||
|
||||
if wmenv['HAVE_WIIUSE']:
|
||||
libs += [ 'wiiuse' ]
|
||||
|
@ -41,4 +41,4 @@ private:
|
||||
int err;
|
||||
static int noinst;
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
@ -63,7 +63,7 @@ wiimote_t** g_WiiMotesFromWiiUse = NULL;
|
||||
Common::Thread* g_pReadThread = NULL;
|
||||
int g_NumberOfWiiMotes;
|
||||
CWiiMote* g_WiiMotes[MAX_WIIMOTES];
|
||||
bool g_Shutdown = false;
|
||||
volatile bool g_Shutdown = false;
|
||||
Common::Event g_StartThread;
|
||||
Common::Event g_StopThreadTemporary;
|
||||
bool g_LocalThread = true;
|
||||
|
@ -193,4 +193,4 @@ void DoState(unsigned char **ptr, int mode)
|
||||
} // Recording
|
||||
|
||||
|
||||
#endif // RERECORDING
|
||||
#endif // RERECORDING
|
||||
|
@ -1,31 +1,30 @@
|
||||
# -*- python -*-
|
||||
|
||||
Import('env')
|
||||
import sys
|
||||
|
||||
name = "Plugin_nJoy_SDL"
|
||||
padenv = env.Clone()
|
||||
|
||||
if not env['HAVE_SDL']:
|
||||
print name + " must have SDL to be build"
|
||||
Return()
|
||||
|
||||
files = [
|
||||
'Config.cpp',
|
||||
'nJoy.cpp',
|
||||
'Rumble.cpp',
|
||||
]
|
||||
if padenv['HAVE_WX']:
|
||||
files += [
|
||||
'GUI/AboutBox.cpp',
|
||||
'GUI/ConfigAdvanced.cpp',
|
||||
'GUI/ConfigJoypad.cpp',
|
||||
'GUI/ConfigBox.cpp',
|
||||
]
|
||||
|
||||
padenv.Append(
|
||||
CXXFLAGS = [ '-fPIC' ],
|
||||
LIBS = [ 'common', 'inputcommon' ],
|
||||
)
|
||||
|
||||
padenv.SharedLibrary(env['plugin_dir']+name, files)
|
||||
# -*- python -*-
|
||||
|
||||
Import('env')
|
||||
import sys
|
||||
|
||||
name = "Plugin_nJoy_SDL"
|
||||
padenv = env.Clone()
|
||||
|
||||
if not env['HAVE_SDL']:
|
||||
print name + " must have SDL to be build"
|
||||
Return()
|
||||
|
||||
files = [
|
||||
'Config.cpp',
|
||||
'nJoy.cpp',
|
||||
'Rumble.cpp',
|
||||
]
|
||||
if padenv['HAVE_WX']:
|
||||
files += [
|
||||
'GUI/AboutBox.cpp',
|
||||
'GUI/ConfigAdvanced.cpp',
|
||||
'GUI/ConfigJoypad.cpp',
|
||||
'GUI/ConfigBox.cpp',
|
||||
]
|
||||
|
||||
padenv.Append(
|
||||
LIBS = [ 'common', 'inputcommon' ],
|
||||
)
|
||||
|
||||
padenv.SharedLibrary(env['plugin_dir']+name, files)
|
||||
|
Reference in New Issue
Block a user