mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-05 17:59:58 +08:00
depress compilation warnings for GCC 9
This commit is contained in:
@@ -1428,10 +1428,12 @@ static LRESULT NewToolbarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARA
|
||||
item_info->add_data = item->add_data;
|
||||
|
||||
if (item_info->which & MTB_WHICH_TEXT)
|
||||
strncpy (item_info->text, item->text, NTB_TEXT_LEN);
|
||||
//strncpy (item_info->text, item->text, NTB_TEXT_LEN);
|
||||
strcpy (item_info->text, item->text);
|
||||
|
||||
if (item_info->which & MTB_WHICH_TIP)
|
||||
strncpy (item_info->tip, item->tip, NTB_TIP_LEN);
|
||||
//strncpy (item_info->tip, item->tip, NTB_TIP_LEN);
|
||||
strcpy (item_info->tip, item->tip);
|
||||
|
||||
return NTB_OKAY;
|
||||
}
|
||||
|
||||
@@ -1010,8 +1010,9 @@ void GUIAPI DestroyDynamicDevFont (DEVFONT** devfont)
|
||||
{
|
||||
char font_name [LEN_UNIDEVFONT_NAME + 1];
|
||||
|
||||
memset(font_name, 0, LEN_UNIDEVFONT_NAME + 1);
|
||||
strncpy(font_name, (*devfont)->name, LEN_UNIDEVFONT_NAME);
|
||||
//memset(font_name, 0, LEN_UNIDEVFONT_NAME + 1);
|
||||
//strncpy(font_name, (*devfont)->name, LEN_UNIDEVFONT_NAME);
|
||||
strcpy(font_name, (*devfont)->name);
|
||||
|
||||
font_DelDevFont (font_name);
|
||||
*devfont = NULL;
|
||||
|
||||
@@ -1243,11 +1243,9 @@ static int wait_event_ex (int maxfd, fd_set *in, fd_set *out, fd_set *except,
|
||||
break;
|
||||
}
|
||||
|
||||
#if 0
|
||||
default:
|
||||
_DBG_PRINTF("IAL>LIBINPUT: got a UNKNOWN event type: %d\n", type);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
libinput_event_destroy(event);
|
||||
|
||||
@@ -1432,7 +1432,9 @@ char * strtrimall( char *src)
|
||||
return src;
|
||||
}
|
||||
|
||||
strcpy (src, src + nIndex1);
|
||||
// VW: use memmove instead of strcpy to avoid overlapping
|
||||
// strcpy (src, src + nIndex1);
|
||||
memmove (src, src + nIndex1, nLen - nIndex1 + 1);
|
||||
|
||||
nLen = strlen (src);
|
||||
nIndex1 = nLen - 1;
|
||||
|
||||
Reference in New Issue
Block a user