Skip to content

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
howard0su committed Jul 12, 2024
1 parent e0c265b commit b268c75
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions ExtIO_sddc/ExtIO_sddc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ static bool GetConsoleInput(char* buf, int maxlen)
{
DWORD nevents = 0;
INPUT_RECORD irInBuf[128];
KEY_EVENT_RECORD key;
int i;
KEY_EVENT_RECORD key = 0;
bool rc = false;
int counter = 0;

if (Hconsole == nullptr) return rc;
HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE);
if (GetNumberOfConsoleInputEvents(hInput, &nevents))
Expand All @@ -118,7 +118,7 @@ static bool GetConsoleInput(char* buf, int maxlen)
dbgprintf("ReadConsoleInput error\n");
return rc;
}
for (i = 0; i < nevents; i++)
for (DWORD i = 0; i < nevents; i++)
{
if (irInBuf[i].EventType == KEY_EVENT)
{
Expand Down Expand Up @@ -211,7 +211,7 @@ bool __declspec(dllexport) __stdcall InitHW(char *name, char *model, int& type)
}
devicelist.numdev = idx;
if (idx > 1){
selected = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_SELECTDEVICE), NULL, DlgSelectDevice, (LPARAM) &devicelist);
selected = (int)DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_SELECTDEVICE), NULL, DlgSelectDevice, (LPARAM) &devicelist);
}
DbgPrintf("selected %d \n",selected);
idx = selected;
Expand Down Expand Up @@ -469,7 +469,7 @@ double EXTIO_API SetHWLOdbl(double LOfreq)
const double wishedLO = LOfreq;
double ret = 0;
rf_mode rfmode = RadioHandler.GetmodeRF();
rf_mode newmode = RadioHandler.PrepareLo(LOfreq);
rf_mode newmode = RadioHandler.PrepareLo((uint64_t)LOfreq);

if (newmode == NOMODE) // this freq is not supported
return -1;
Expand Down Expand Up @@ -502,7 +502,7 @@ double EXTIO_API SetHWLOdbl(double LOfreq)
}

double internal_LOfreq = LOfreq / FreqCorrectionFactor();
internal_LOfreq = RadioHandler.TuneLO(internal_LOfreq);
internal_LOfreq = RadioHandler.TuneLO((uint64_t)internal_LOfreq);
gfLOfreq = LOfreq = internal_LOfreq * FreqCorrectionFactor();
if (wishedLO != LOfreq)
{
Expand Down Expand Up @@ -869,7 +869,7 @@ int SetOverclock(uint32_t adcfreq)

RadioHandler.Start(ExtIoGetActualSrateIdx());
double internal_LOfreq = gfLOfreq / FreqCorrectionFactor();
RadioHandler.TuneLO(internal_LOfreq);
RadioHandler.TuneLO((uint64_t)internal_LOfreq);
return 0;
}

Expand Down Expand Up @@ -1034,11 +1034,11 @@ void SaveSettings()
char idxvalue[30];
sprintf(idxvalue, "%03d_Value", idx);
// write the value
RegSetValueEx(handle, idxvalue, 0, REG_SZ, (const BYTE*)value, strlen(value));
RegSetValueEx(handle, idxvalue, 0, REG_SZ, (const BYTE*)value, (DWORD)strlen(value));

sprintf(idxvalue, "%03d_Description", idx);
// write the value
RegSetValueEx(handle, idxvalue, 0, REG_SZ, (const BYTE*)desc, strlen(desc));
RegSetValueEx(handle, idxvalue, 0, REG_SZ, (const BYTE*)desc, (DWORD)strlen(desc));
// fetch next
idx++;
ret = ExtIoGetSetting(idx, desc, value);
Expand Down
4 changes: 2 additions & 2 deletions ExtIO_sddc/tdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ INT_PTR CALLBACK DlgMainFn(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
HDC hDc = (HDC)wParam;
SetBkMode(hDc, TRANSPARENT);
return (LONG)g_hbrBackground;
return (INT_PTR)g_hbrBackground;
}

case WM_USER + 1:
Expand Down Expand Up @@ -492,7 +492,7 @@ INT_PTR CALLBACK DlgSelectDevice(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPa
{
HDC hDc = (HDC)wParam;
SetBkMode(hDc, TRANSPARENT);
return (LONG)g_hbrBackground;
return (INT_PTR)g_hbrBackground;
}
case WM_COMMAND:
switch (LOWORD(wParam))
Expand Down

0 comments on commit b268c75

Please sign in to comment.