fix clang errors

This commit is contained in:
zeromus 2022-02-10 14:44:31 -05:00
parent b2c2e8f5ee
commit 5e48c9c44a
5 changed files with 9 additions and 5 deletions

View File

@ -5,6 +5,10 @@
#ifdef MY_CPU_X86_OR_AMD64
#ifdef _MSC_VER
#include <intrin.h>
#endif
#if (defined(_MSC_VER) && !defined(MY_CPU_AMD64)) || defined(__GNUC__)
#define USE_ASM
#endif

View File

@ -553,7 +553,7 @@ BOOL di_init()
dipdw.dwData = 0;
if ( !FAILED( pJoystick->SetProperty(DIPROP_AUTOCENTER, &dipdw.diph) ) )
{
DWORD rgdwAxes[1] = { DIJOFS_Y };
DWORD rgdwAxes[1] = { (DWORD)DIJOFS_Y };
LONG rglDirection[2] = { 0 };
DICONSTANTFORCE cf = { 0 };
DIEFFECT eff;

View File

@ -217,8 +217,8 @@ LRESULT OamView_OnPaint(HWND hwnd, oamview_struct *win, WPARAM wParam, LPARAM lP
win->gpu->SpriteRenderDebug(i, (u16*)(bitmap + i * 256));
}
u32 width = dimm_int[(oam->attr1>>14)][(oam->attr0>>14)][0];
u32 height = dimm_int[(oam->attr1>>14)][(oam->attr0>>14)][1];
int width = dimm_int[(oam->attr1>>14)][(oam->attr0>>14)][0];
int height = dimm_int[(oam->attr1>>14)][(oam->attr0>>14)][1];
RECT rc = {180 + x, 4 + y, 180 + x + width, 4 + y + height};
SetDIBitsToDevice(hdc, 180, 4, 256, 192, 0, 0, 0, 192, bitmap, (BITMAPINFO*)&bmi, DIB_RGB_COLORS);

View File

@ -1019,7 +1019,7 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
Item->item.pszText = num;
} return true;
case 2:
Item->item.pszText = rswatches[iNum].comment ? rswatches[iNum].comment : "";
Item->item.pszText = (char *)(rswatches[iNum].comment ? rswatches[iNum].comment : "");
return true;
default:

View File

@ -371,7 +371,7 @@ INT_PTR CALLBACK LevelBarProc(HWND hBar, UINT msg, WPARAM wParam, LPARAM lParam)
u8 chan = (u8)GetProp(hBar, "chan");
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hBar, &ps);
u32 vol = volBar[chan + chanOfs()];
int vol = volBar[chan + chanOfs()];
if (vol > 0)
{
RECT rc = {0, 0, vol, ps.rcPaint.bottom};