depress compilation warnings for GCC 9

This commit is contained in:
Vincent Wei
2020-07-23 18:54:19 +08:00
parent fc6d3a686e
commit e5ac135443
4 changed files with 10 additions and 7 deletions

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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);

View File

@@ -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;