octeon-sdk: suppress another set of warnings under clang
Clang sees this construct and warns that adding an int to a string like this does not concatenate the two. Fortunately, this is not what octeon-sdk actually intended to do, so we take the path towards remediation that clang offers: use array indexing instead.
This commit is contained in:
parent
2946ed83c0
commit
da0a7834ac
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=352605
@ -355,7 +355,7 @@ enum cvmx_chip_types_enum {
|
||||
#define CVMX_BOARD_TYPE_NAO38 CVMX_BOARD_TYPE_NAC38
|
||||
|
||||
/* Functions to return string based on type */
|
||||
#define ENUM_BRD_TYPE_CASE(x) case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */
|
||||
#define ENUM_BRD_TYPE_CASE(x) case x: return(&#x[16]); /* Skip CVMX_BOARD_TYPE_ */
|
||||
static inline const char *cvmx_board_type_to_string(enum cvmx_board_types_enum type)
|
||||
{
|
||||
switch (type)
|
||||
@ -491,7 +491,7 @@ static inline const char *cvmx_board_type_to_string(enum cvmx_board_types_enum t
|
||||
return "Unsupported Board";
|
||||
}
|
||||
|
||||
#define ENUM_CHIP_TYPE_CASE(x) case x: return(#x + 15); /* Skip CVMX_CHIP_TYPE */
|
||||
#define ENUM_CHIP_TYPE_CASE(x) case x: return(&#x[15]); /* Skip CVMX_CHIP_TYPE */
|
||||
static inline const char *cvmx_chip_type_to_string(enum cvmx_chip_types_enum type)
|
||||
{
|
||||
switch (type)
|
||||
|
Loading…
Reference in New Issue
Block a user