https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9bc2a273938f43a8deebd…
commit 9bc2a273938f43a8deebdc91ecbe20d5968fceed
Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr>
AuthorDate: Tue Feb 13 13:05:35 2018 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sun Feb 18 14:14:52 2018 +0100
[KMTESTS:NPFS] Fix 2 Clang-Cl warnings about ShareAccess
"warning: variable 'ShareAccess' is used uninitialized whenever
'if' condition is false [-Wsometimes-uninitialized]"
CORE-14306
---
modules/rostests/kmtests/npfs/NpfsHelpers.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/modules/rostests/kmtests/npfs/NpfsHelpers.c
b/modules/rostests/kmtests/npfs/NpfsHelpers.c
index 00864990b5..3dc9267bf8 100644
--- a/modules/rostests/kmtests/npfs/NpfsHelpers.c
+++ b/modules/rostests/kmtests/npfs/NpfsHelpers.c
@@ -103,6 +103,11 @@ NpCreatePipe(
ShareAccess = FILE_SHARE_READ;
else if (NamedPipeConfiguration == FILE_PIPE_FULL_DUPLEX)
ShareAccess = FILE_SHARE_READ | FILE_SHARE_WRITE;
+ else
+ {
+ ASSERTMSG("Invalid NamedPipeConfiguration parameter value!", FALSE);
+ return STATUS_INVALID_PARAMETER_6;
+ }
DefaultTimeout.QuadPart = -50 * 1000 * 10;
@@ -185,6 +190,11 @@ NpOpenPipe(
ShareAccess = FILE_SHARE_READ;
else if (NamedPipeConfiguration == FILE_PIPE_FULL_DUPLEX)
ShareAccess = FILE_SHARE_READ | FILE_SHARE_WRITE;
+ else
+ {
+ ASSERTMSG("Invalid NamedPipeConfiguration parameter value!", FALSE);
+ return STATUS_INVALID_PARAMETER_3;
+ }
return NpOpenPipeEx(ClientHandle,
PipePath,