Reviewed-by: Vasileios Almpanis <[email protected]>
On 3/23/26 9:31 PM, Konstantin Khorenko wrote:
set-process-name.c: In function 'check_name': set-process-name.c:61:13: warning: variable 'j' set but not used [-Wunused-but-set-variable] 61 | int j; | ^ Remove unused 'j' to fix -Wunused-but-set-variable warning. The snprintf() return value is not needed here. https://virtuozzo.atlassian.net/browse/VSTOR-127529 Signed-off-by: Konstantin Khorenko <[email protected]> Feature: fix selftests --- tools/testing/selftests/prctl/set-process-name.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/testing/selftests/prctl/set-process-name.c b/tools/testing/selftests/prctl/set-process-name.c index 562f707ba771..27468cb86a39 100644 --- a/tools/testing/selftests/prctl/set-process-name.c +++ b/tools/testing/selftests/prctl/set-process-name.c @@ -58,9 +58,8 @@ int check_name(void) char path[MAX_PATH_LEN] = {}; char name[TASK_COMM_LEN] = {}; char output[TASK_COMM_LEN] = {}; - int j;- j = snprintf(path, MAX_PATH_LEN, "/proc/self/task/%d/comm", pid);+ snprintf(path, MAX_PATH_LEN, "/proc/self/task/%d/comm", pid); fptr = fopen(path, "r"); if (!fptr) return -EIO;
_______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
