mirror of
https://github.com/torvalds/linux.git
synced 2026-12-04 12:24:18 +00:00
perf kmem: Fix compiler warning about may be accessing uninitialized variable
The last argument to strtok_r doesn't need to be initialized, its just a placeholder to make this routine reentrant, but gcc doesn't know about that and complains, breaking the build, fix it by setting it to NULL. Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
@@ -644,7 +644,7 @@ static char *compact_gfp_flags(char *gfp_flags)
|
||||
{
|
||||
char *orig_flags = strdup(gfp_flags);
|
||||
char *new_flags = NULL;
|
||||
char *str, *pos;
|
||||
char *str, *pos = NULL;
|
||||
size_t len = 0;
|
||||
|
||||
if (orig_flags == NULL)
|
||||
|
||||
Reference in New Issue
Block a user