mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/kdd: Fix uninitialised variable warning
Clang warns:
kdd.c:1031:9: error: variable 'fd' is used uninitialized whenever '||'
condition is true [-Werror,-Wsometimes-uninitialized]
if (argc != 4
^~~~~~~~~
kdd.c:1040:20: note: uninitialized use occurs here
if (select(fd + 1, &fds, NULL, NULL, NULL) > 0)
^~
This situation can't actually happen, as usage() is a terminal path. Annotate
it appropriately.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
This commit is contained in:
1 parent
ca4c1848f1
commit
bec4135fdc
1 file changed
+1
-1
@@ -998,7 +998,7 @@ void kdd_select_callback(kdd_state *s)
|
||||
}
|
||||
|
||||
|
||||
static void usage(void)
|
||||
static void __attribute__((noreturn)) usage(void)
|
||||
{
|
||||
fprintf(stderr,
|
||||
" usage: kdd [-v] <domid> <address> <port>\n"
|
||||
|
||||