git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx: fix build with clang 9
[dpdk.git]
/
drivers
/
net
/
mlx5
/
mlx5_utils.h
diff --git
a/drivers/net/mlx5/mlx5_utils.h
b/drivers/net/mlx5/mlx5_utils.h
index
b4ed8c6
..
ebf79b8
100644
(file)
--- a/
drivers/net/mlx5/mlx5_utils.h
+++ b/
drivers/net/mlx5/mlx5_utils.h
@@
-146,9
+146,10
@@
extern int mlx5_logtype;
/* Allocate a buffer on the stack and fill it with a printf format string. */
#define MKSTR(name, ...) \
/* Allocate a buffer on the stack and fill it with a printf format string. */
#define MKSTR(name, ...) \
- char name[snprintf(NULL, 0, __VA_ARGS__) + 1]; \
+ int mkstr_size_##name = snprintf(NULL, 0, "" __VA_ARGS__); \
+ char name[mkstr_size_##name + 1]; \
\
\
- snprintf(name, sizeof(name), __VA_ARGS__)
+ snprintf(name, sizeof(name),
""
__VA_ARGS__)
/**
* Return logarithm of the nearest power of two above input value.
/**
* Return logarithm of the nearest power of two above input value.