[PATCH] ntdll: Silence clang warning.
Daniel Lehman
dlehman25 at gmail.com
Sun May 23 15:20:55 CDT 2021
Signed-off-by: Daniel Lehman <dlehman25 at gmail.com>
---
../dlls/ntdll/unix/thread.c:1239:9: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (!self || exit_code)
^~~~~~~~~~~~~~~~~~
../dlls/ntdll/unix/thread.c:1251:12: note: uninitialized use occurs here
return ret;
^~~
../dlls/ntdll/unix/thread.c:1239:5: note: remove the 'if' if its condition is always true
if (!self || exit_code)
^~~~~~~~~~~~~~~~~~~~~~~
../dlls/ntdll/unix/thread.c:1236:17: note: initialize the variable 'ret' to silence this warning
NTSTATUS ret;
^
= 0
1 warning generated.
---
dlls/ntdll/unix/thread.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
index 624dff0e5f1..b14b441c094 100644
--- a/dlls/ntdll/unix/thread.c
+++ b/dlls/ntdll/unix/thread.c
@@ -1013,7 +1013,7 @@ void abort_process( int status )
/***********************************************************************
* exit_thread
*/
-static void exit_thread( int status )
+static DECLSPEC_NORETURN void exit_thread( int status )
{
static void *prev_teb;
TEB *teb;
--
2.25.1
More information about the wine-devel
mailing list