Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/cpudist: Fix warning introduced by recent change #4149

Merged
merged 1 commit into from
Aug 8, 2022

Conversation

chenhengqi
Copy link
Collaborator

With #4131 included, running the tool with -L reports the following warning:

/virtual/main.c:57:28: warning: multi-character character constant [-Wmultichar]
    pid_key_t key = {.id = ' + pid + ', .slot = bpf_log2l(delta)};
                           ^
/virtual/main.c:57:28: warning: character constant too long for its type
2 warnings generated.

The pid part should not be treated as string literal. Fix it.

Signed-off-by: Hengqi Chen chenhengqi@outlook.com

With iovisor#4131 included, running the tool with -L reports the following warning:

    /virtual/main.c:57:28: warning: multi-character character constant [-Wmultichar]
        pid_key_t key = {.id = ' + pid + ', .slot = bpf_log2l(delta)};
                               ^
    /virtual/main.c:57:28: warning: character constant too long for its type
    2 warnings generated.

The `pid` part should not be treated as string literal. Fix it.

Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants