Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quiet some warnings which appear on vs2015. #2217

Merged
merged 1 commit into from
Mar 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Externals/soundtouch/SoundTouch.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<ClCompile Include="FIRFilter.cpp" />
<ClCompile Include="InterpolateCubic.cpp" />
<ClCompile Include="InterpolateLinear.cpp" />
<ClCompile Include="InterpolateShannon.cpp" />
<ClCompile Include="InterpolateShannon.cpp" />
<ClCompile Include="mmx_optimized.cpp" />
<ClCompile Include="PeakFinder.cpp" />
<ClCompile Include="RateTransposer.cpp" />
Expand All @@ -59,7 +59,7 @@
<ClInclude Include="FIRFilter.h" />
<ClInclude Include="InterpolateCubic.h" />
<ClInclude Include="InterpolateLinear.h" />
<ClInclude Include="InterpolateShannon.h" />
<ClInclude Include="InterpolateShannon.h" />
<ClInclude Include="PeakFinder.h" />
<ClInclude Include="RateTransposer.h" />
<ClInclude Include="SoundTouch.h" />
Expand Down
1 change: 1 addition & 0 deletions Externals/wxWidgets3/build/msw/wx_base.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,7 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\..\Source\VSProps\Base.props" />
<Import Project="..\..\..\..\Source\VSProps\WXWOverrides.props" />
<Import Project="..\..\..\..\Source\VSProps\ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
Expand Down
2 changes: 1 addition & 1 deletion Externals/wxWidgets3/include/wx/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ class WXDLLIMPEXP_CORE wxAppBase : public wxAppConsole
// very first initialization function
//
// Override: very rarely
virtual bool Initialize(int& argc, wxChar **argv);
virtual bool Initialize(int& _argc, wxChar **_argv);

// a platform-dependent version of OnInit(): the code here is likely to
// depend on the toolkit. default version does nothing.
Expand Down
2 changes: 1 addition & 1 deletion Externals/wxWidgets3/include/wx/msw/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class WXDLLIMPEXP_CORE wxApp : public wxAppBase
virtual ~wxApp();

// override base class (pure) virtuals
virtual bool Initialize(int& argc, wxChar **argv);
virtual bool Initialize(int& _argc, wxChar **_argv);

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

virtual void CleanUp();

virtual void WakeUpIdle();
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/PowerPC/Jit64/Jit.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Jit64 : public Jitx86Base
// Jit!

void Jit(u32 em_address) override;
const u8* DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buffer, JitBlock *b, u32 nextPC);
const u8* DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBlock *b, u32 nextPC);

BitSet32 CallerSavedRegistersInUse();

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,7 @@ void Jit64::rlwimix(UGeckoInstruction inst)
bool isRightShift = mask == (1U << inst.SH) - 1;
if (gpr.R(a).IsImm())
{
u32 maskA = gpr.R(a).offset & ~mask;
u32 maskA = (u32)gpr.R(a).offset & ~mask;

This comment was marked as off-topic.

This comment was marked as off-topic.

gpr.BindToRegister(a, false, true);
MOV(32, gpr.R(a), gpr.R(s));
if (isLeftShift)
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/PowerPC/Jit64IL/JitIL.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class JitIL : public JitILBase
// Jit!

void Jit(u32 em_address) override;
const u8* DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buffer, JitBlock *b, u32 nextPC);
const u8* DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBlock *b, u32 nextPC);

void Trace();

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinWX/GameListCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ static wxString NiceSizeFormat(u64 _size)
// div 10 to get largest named unit less than _size
// 10 == log2(1024) (number of B in a KiB, KiB in a MiB, etc)
const u64 unit = IntLog2(std::max<u64>(_size, 1)) / 10;
const u64 unit_size = (1 << (unit * 10));
const u64 unit_size = (1ull << (unit * 10));

// mul 1000 for 3 decimal places, add 5 to round up, div 10 for 2 decimal places
std::string value = std::to_string((_size * 1000 / unit_size + 5) / 10);
Expand Down
24 changes: 12 additions & 12 deletions Source/Core/VideoBackends/D3D/D3DBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,41 +154,41 @@ void UnloadD3DCompiler()

std::vector<DXGI_SAMPLE_DESC> EnumAAModes(IDXGIAdapter* adapter)
{
std::vector<DXGI_SAMPLE_DESC> aa_modes;
std::vector<DXGI_SAMPLE_DESC> _aa_modes;

// NOTE: D3D 10.0 doesn't support multisampled resources which are bound as depth buffers AND shader resources.
// Thus, we can't have MSAA with 10.0 level hardware.
ID3D11Device* device;
ID3D11DeviceContext* context;
ID3D11Device* _device;
ID3D11DeviceContext* _context;
D3D_FEATURE_LEVEL feat_level;
HRESULT hr = PD3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr, D3D11_CREATE_DEVICE_SINGLETHREADED, supported_feature_levels, NUM_SUPPORTED_FEATURE_LEVELS, D3D11_SDK_VERSION, &device, &feat_level, &context);
HRESULT hr = PD3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr, D3D11_CREATE_DEVICE_SINGLETHREADED, supported_feature_levels, NUM_SUPPORTED_FEATURE_LEVELS, D3D11_SDK_VERSION, &_device, &feat_level, &_context);
if (FAILED(hr) || feat_level == D3D_FEATURE_LEVEL_10_0)
{
DXGI_SAMPLE_DESC desc;
desc.Count = 1;
desc.Quality = 0;
aa_modes.push_back(desc);
SAFE_RELEASE(context);
SAFE_RELEASE(device);
_aa_modes.push_back(desc);
SAFE_RELEASE(_context);
SAFE_RELEASE(_device);
}
else
{
for (int samples = 0; samples < D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT; ++samples)
{
UINT quality_levels = 0;
device->CheckMultisampleQualityLevels(DXGI_FORMAT_R8G8B8A8_UNORM, samples, &quality_levels);
_device->CheckMultisampleQualityLevels(DXGI_FORMAT_R8G8B8A8_UNORM, samples, &quality_levels);
if (quality_levels > 0)
{
DXGI_SAMPLE_DESC desc;
desc.Count = samples;
for (desc.Quality = 0; desc.Quality < quality_levels; ++desc.Quality)
aa_modes.push_back(desc);
_aa_modes.push_back(desc);
}
}
context->Release();
device->Release();
_context->Release();
_device->Release();
}
return aa_modes;
return _aa_modes;
}

D3D_FEATURE_LEVEL GetFeatureLevel(IDXGIAdapter* adapter)
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/VideoBackends/D3D/D3DUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,10 @@ int CD3DFont::DrawTextScaled(float x, float y, float size, float spacing, u32 dw
D3D::context->Draw(3 * dwNumTriangles, 0);

dwNumTriangles = 0;
D3D11_MAPPED_SUBRESOURCE vbmap;
hr = context->Map(m_pVB, 0, D3D11_MAP_WRITE_DISCARD, 0, &vbmap);
D3D11_MAPPED_SUBRESOURCE _vbmap;
hr = context->Map(m_pVB, 0, D3D11_MAP_WRITE_DISCARD, 0, &_vbmap);
if (FAILED(hr)) PanicAlert("Mapping vertex buffer failed, %s %d\n", __FILE__, __LINE__);
pVertices = (D3D::FONT2DVERTEX*)vbmap.pData;
pVertices = (D3D::FONT2DVERTEX*)_vbmap.pData;
}
sx += w + spacing * scalex * size;
}
Expand Down
8 changes: 4 additions & 4 deletions Source/Core/VideoBackends/D3D/Render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -872,10 +872,10 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
if (FramebufferManagerBase::LastXfbWidth() != fbStride || FramebufferManagerBase::LastXfbHeight() != fbHeight)
{
xfbchanged = true;
unsigned int w = (fbStride < 1 || fbStride > MAX_XFB_WIDTH) ? MAX_XFB_WIDTH : fbStride;
unsigned int h = (fbHeight < 1 || fbHeight > MAX_XFB_HEIGHT) ? MAX_XFB_HEIGHT : fbHeight;
FramebufferManagerBase::SetLastXfbWidth(w);
FramebufferManagerBase::SetLastXfbHeight(h);
unsigned int xfb_w = (fbStride < 1 || fbStride > MAX_XFB_WIDTH) ? MAX_XFB_WIDTH : fbStride;
unsigned int xfb_h = (fbHeight < 1 || fbHeight > MAX_XFB_HEIGHT) ? MAX_XFB_HEIGHT : fbHeight;
FramebufferManagerBase::SetLastXfbWidth(xfb_w);
FramebufferManagerBase::SetLastXfbHeight(xfb_h);
}

// Flip/present backbuffer to frontbuffer here
Expand Down
6 changes: 2 additions & 4 deletions Source/Core/VideoBackends/D3D/TextureCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ bool TextureCache::TCacheEntry::Save(const std::string& filename, unsigned int l
D3D::context->CopyResource(pNewTexture, pSurface);

D3D11_MAPPED_SUBRESOURCE map;
HRESULT hr = D3D::context->Map(pNewTexture, 0, D3D11_MAP_READ_WRITE, 0, &map);
hr = D3D::context->Map(pNewTexture, 0, D3D11_MAP_READ_WRITE, 0, &map);
if (SUCCEEDED(hr))
{
saved_png = TextureToPng((u8*)map.pData, map.RowPitch, filename, desc.Width, desc.Height);
Expand Down Expand Up @@ -177,13 +177,11 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
u8* dst = Memory::GetPointer(dstAddr);
size_t encoded_size = g_encoder->Encode(dst, dstFormat, srcFormat, srcRect, isIntensity, scaleByHalf);

u64 hash = GetHash64(dst, (int)encoded_size, g_ActiveConfig.iSafeTextureCache_ColorSamples);

size_in_bytes = (u32)encoded_size;

TextureCache::MakeRangeDynamic(dstAddr, (u32)encoded_size);

this->hash = hash;
this->hash = GetHash64(dst, (int)encoded_size, g_ActiveConfig.iSafeTextureCache_ColorSamples);

This comment was marked as off-topic.

This comment was marked as off-topic.

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1912,7 +1912,7 @@ namespace GLExtensions
*func = dlsym(RTLD_NEXT, name.c_str());
#endif
if (*func == nullptr && _isES)
*func = (void*)0xFFFFFFFF; // Easy to determine invalid function, just so we continue on
*func = (void*)(uintptr_t)0xFFFFFFFF; // Easy to determine invalid function, just so we continue on
if (*func == nullptr)
ERROR_LOG(VIDEO, "Couldn't load function %s", name.c_str());
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoCommon/TextureCacheBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class TextureCache

// Removes textures which aren't used for more than TEXTURE_KILL_THRESHOLD frames,
// frameCount is the current frame number.
static void Cleanup(int frameCount);
static void Cleanup(int _frameCount);

This comment was marked as off-topic.

This comment was marked as off-topic.


static void Invalidate();
static void MakeRangeDynamic(u32 start_address, u32 size);
Expand Down
1 change: 0 additions & 1 deletion Source/VSProps/WXWOverrides.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>wx/wxprec.h</PrecompiledHeaderFile>
<ExceptionHandling>Async</ExceptionHandling>
<DisableSpecificWarnings>4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<PreprocessorDefinitions>__WXMSW__;WXBUILDING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\;..\..\include;..\..\..\xxhash;..\..\..\zlib;..\..\..\libpng</AdditionalIncludeDirectories>
</ClCompile>
Expand Down