Even more sonarlint work

This commit is contained in:
Jasmine Iwanek
2023-06-01 18:32:25 -04:00
parent ef2b84ed63
commit d1127e68fa
89 changed files with 2509 additions and 1542 deletions

View File

@@ -72,7 +72,7 @@ opendir(const char *name)
}
/* All OK. */
return (p);
return p;
}
/* Close an open directory. */
@@ -80,7 +80,7 @@ int
closedir(DIR *p)
{
if (p == NULL)
return (0);
return 0;
_findclose(p->handle);
@@ -88,7 +88,7 @@ closedir(DIR *p)
free(p->dta);
free(p);
return (0);
return 0;
}
/*

View File

@@ -168,8 +168,7 @@ preferences_settings_changed(void)
static int
preferences_indexof(HWND combo, LPARAM itemdata)
{
int i;
for (i = 0; i < SendMessage(combo, CB_GETCOUNT, 0, 0); i++)
for (int i = 0; i < SendMessage(combo, CB_GETCOUNT, 0, 0); i++)
if (SendMessage(combo, CB_GETITEMDATA, i, 0) == itemdata)
return i;
@@ -267,10 +266,9 @@ PreferencesDlgProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
case WM_DESTROY:
{
int i;
LRESULT temp;
HWND combo = GetDlgItem(hdlg, IDC_COMBO_ICON);
for (i = 0; i < SendMessage(combo, CB_GETCOUNT, 0, 0); i++) {
for (int i = 0; i < SendMessage(combo, CB_GETCOUNT, 0, 0); i++) {
temp = SendMessage(combo, CB_GETITEMDATA, i, 0);
if (temp) {
free((void *) temp);

View File

@@ -79,7 +79,7 @@ SoundGainDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
break;
}
return (FALSE);
return FALSE;
}
void

View File

@@ -47,7 +47,7 @@ SpecifyDimensionsDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM
RECT r;
uint32_t temp_x = 0;
uint32_t temp_y = 0;
int dpi = 96;
int dpi = 96;
int lock;
LPTSTR lptsTemp;
char *stransi;

View File

@@ -492,11 +492,20 @@ ui_sb_set_ready(int ready)
void
ui_sb_update_panes(void)
{
int i, id;
int cart_int, mfm_int, xta_int, esdi_int, ide_int, scsi_int;
int i;
int id;
int cart_int;
int mfm_int;
int xta_int;
int esdi_int;
int ide_int;
int scsi_int;
int edge = 0;
int c_mfm, c_esdi, c_xta;
int c_ide, c_scsi;
int c_mfm;
int c_esdi;
int c_xta;
int c_ide;
int c_scsi;
int do_net;
char *hdc_name;
@@ -930,7 +939,8 @@ void
StatusBarCreate(HWND hwndParent, uintptr_t idStatus, HINSTANCE hInst)
{
RECT rectDialog;
int dw, dh;
int dw;
int dh;
/* Get current DPI and calculate icon sizes */
dpi = win_get_dpi(hwndParent);

View File

@@ -204,5 +204,5 @@ ui_window_title(wchar_t *s)
s = wTitle;
}
return (s);
return s;
}