Skip to content

Conversation

@drakenclimber
Copy link
Member

No description provided.

@drakenclimber drakenclimber added this to the Adaptived v1.1.0 milestone Jul 30, 2025
@drakenclimber drakenclimber requested a review from sidkumar99 July 30, 2025 22:53
@drakenclimber drakenclimber self-assigned this Jul 30, 2025
@drakenclimber drakenclimber added the enhancement New feature or request label Jul 30, 2025
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 30, 2025
@sidkumar99
Copy link
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>
@drakenclimber drakenclimber merged commit a8b2639 into oracle:master Aug 14, 2025
6 checks passed
@drakenclimber drakenclimber deleted the clang branch August 14, 2025 15:25
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants