Welcome! Log In Create A New Profile

Advanced

[njs] Fixed building by Clang.

Anonymous User
November 07, 2024 01:54PM
details: https://github.com/nginx/njs/commit/e845d5e553ec6986ec133972544c4c1e171e4f52
branches: master
commit: e845d5e553ec6986ec133972544c4c1e171e4f52
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Wed, 6 Nov 2024 15:59:32 -0800
description:
Fixed building by Clang.

src/qjs.c:347:19: error: variable 'signo' may be uninitialized when used
here [-Werror,-Wconditional-uninitialized]
347 | if (kill(pid, signo) < 0) {
| ^~~~~
src/qjs.c:294:31: note: initialize the variable 'signo' to silence this
warning
294 | int signo, pid;
| ^
| = 0
1 error generated.

---
src/qjs.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/src/qjs.c b/src/qjs.c
index 44e9fe95..f9615668 100644
--- a/src/qjs.c
+++ b/src/qjs.c
@@ -301,6 +301,8 @@ qjs_process_kill(JSContext *ctx, JSValueConst this_val, int argc,
return JS_EXCEPTION;
}

+ signo = SIGTERM;
+
if (JS_IsNumber(argv[1])) {
if (JS_ToInt32(ctx, &signo, argv[1]) < 0) {
return JS_EXCEPTION;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Fixed building by Clang.

Anonymous User 156 November 07, 2024 01:54PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 123
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready