-
Notifications
You must be signed in to change notification settings - Fork 15
Add a Github Actions job to build adaptived with clang #54
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
|
Reviewed-by: Sidhartha Kumar sidhartha.kumar@oracle.com |
Update the Github Actions to use the latest version, @v4, of the checkout action. Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Fix the following clang warning by declaring this variable at the start of the function: shared_data.c:218:4: warning: label followed by a declaration is a C23 extension [-Wc23-extensions] 218 | struct adaptived_name_and_value *name_value; | ^ Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Fix the following clang warnings by moving the trailing ")" to the
correct location:
utils/cgroup_utils.c:238:61: warning: size argument in 'strncmp' call is
a comparison [-Wmemsize-comparison]
238 | strncmp(validate_value, value,
strlen(validate_value) != 0)) {
|
~~~~~~~~~~~~~~~~~~~~~~~^~~~
utils/cgroup_utils.c:238:7: note: did you mean to compare the result of
'strncmp' instead?
238 | strncmp(validate_value, value,
strlen(validate_value) != 0)) {
| ^
~
|
)
utils/cgroup_utils.c:238:38: note: explicitly cast the argument to
size_t to silence this warning
238 | strncmp(validate_value, value,
strlen(validate_value) != 0)) {
| ^
| (size_t)(
)
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Fix the following clang warnings by moving the trailing ")" to the
correct location:
utils/sd_bus_utils.c:448:62: warning: size argument in 'strncmp' call is
a comparison [-Wmemsize-comparison]
448 | strncmp(validate_value, value,
strlen(validate_value) != 0)) {
|
~~~~~~~~~~~~~~~~~~~~~~~^~~~
utils/sd_bus_utils.c:448:8: note: did you mean to compare the result of
'strncmp' instead?
448 | strncmp(validate_value, value,
strlen(validate_value) != 0)) {
| ^
~
|
)
utils/sd_bus_utils.c:448:39: note: explicitly cast the argument to
size_t to silence this warning
448 | strncmp(validate_value, value,
strlen(validate_value) != 0)) {
| ^
|
(size_t)( )
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Fix uninitialized usage warning for the ctx variable: 015-load_rule_at_runtime.c:116:6: warning: variable 'ctx' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] 116 | if (ret) | ^~~ 015-load_rule_at_runtime.c:180:24: note: uninitialized use occurs here 180 | adaptived_unload_rule(ctx, rule_name); | ^~~ Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Fix uninitialized usage for the ctx variable: 016-unload_rule_at_runtime.c:119:6: warning: variable 'ctx' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] 119 | if (ret) | ^~~ 016-unload_rule_at_runtime.c:190:24: note: uninitialized use occurs here 190 | adaptived_unload_rule(ctx, rule_name); | ^~~ Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Fix the following clang warning by initializing cse to NULL: 018-effect-cgroup_setting_set_str.c:95:6: warning: variable 'cse' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] 95 | if (!rule) | ^~~~~ 018-effect-cgroup_setting_set_str.c:154:6: note: uninitialized use occurs here 154 | if (cse) | ^~~ Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Fix clang warning in test 011 where the initialization to NULL of an
array of structs was ambiguous.
011-kill_processes_sort.cpp:66:39: warning: suggest braces around
initialization of subobject [-Wmissing-braces]
66 | struct pid_info pida[array_size] = { 0 };
| ^
| {}
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Fix the following clang warning by explicitly initializing the type variable: 012-shared_data.cpp:133:46: warning: variable 'type' is uninitialized when used here [-Wuninitialized] 133 | ret = adaptived_update_shared_data(&cse, 0, type, &read_data, 0); | ^~~~ 012-shared_data.cpp:125:2: note: variable 'type' is declared here 125 | enum adaptived_sdata_type type; | ^ Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Add a Github Actions job to build adaptived using clang. Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
OCA Verified
All contributors have signed the Oracle Contributor Agreement.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.