eal: explicit cast of strlcpy return
GCC 8.1 warns:
rte_string_fns.h: In function 'rte_strlcpy':
rte_string_fns.h:58:9:
warning: conversion to 'size_t' {aka 'long unsigned int'} from
'int' may change the sign of the result [-Wsign-conversion]
return snprintf(dst, size, "%s", src);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: 5364de644a
("eal: support strlcpy function")
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
parent
a2ff2827dc
commit
622a7305d1
@ -55,7 +55,7 @@ rte_strsplit(char *string, int stringlen,
|
||||
static inline size_t
|
||||
rte_strlcpy(char *dst, const char *src, size_t size)
|
||||
{
|
||||
return snprintf(dst, size, "%s", src);
|
||||
return (size_t)snprintf(dst, size, "%s", src);
|
||||
}
|
||||
|
||||
/* pull in a strlcpy function */
|
||||
|
Loading…
Reference in New Issue
Block a user