Skip to content

Commit 40e44ef

Browse files
acmelgregkh
authored andcommitted
perf trace: Deal with compiler const checks
commit 2c85060 upstream. The strchr() function these days return const/non-const based on the arg it receives, and sometimes we need to use casts when we're dealing with variables that are used in code that needs to safely change the returned value and sometimes not (as it points to really const areas). Tweak one such case. Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 30bbd7e commit 40e44ef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/perf/builtin-trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5169,7 +5169,7 @@ static int trace__parse_events_option(const struct option *opt, const char *str,
51695169
}
51705170

51715171
while (1) {
5172-
if ((sep = strchr(s, ',')) != NULL)
5172+
if ((sep = strchr((char *)s, ',')) != NULL)
51735173
*sep = '\0';
51745174

51755175
list = 0;

0 commit comments

Comments
 (0)