]> mj.ucw.cz Git - pciutils.git/commitdiff
libpci: i386-io-windows.h: Mute false-positive warning
authorPali Rohár <pali@kernel.org>
Fri, 31 Dec 2021 15:43:25 +0000 (16:43 +0100)
committerMartin Mareš <mj@ucw.cz>
Sat, 1 Jan 2022 21:50:16 +0000 (22:50 +0100)
  i386-ports.c: In function ‘conf12_setup_io’:
  i386-io-windows.h:1021: warning: ‘old_token’ may be used uninitialized in this function
  i386-io-windows.h:1021: note: ‘old_token’ was declared here

It is always properly initialized when accessed, just gcc compiler does not see it.

lib/i386-io-windows.h

index 772c6f26f791af151e1a50edfcffd5ed59f83596..6cf3a25581135efacd54249dcfd70bb3d7985e13 100644 (file)
@@ -1031,6 +1031,7 @@ SetProcessUserModeIOPL(VOID)
   impersonate_privilege_enabled = FALSE;
   revert_to_old_token = FALSE;
   lsass_token = NULL;
+  old_token = NULL;
 
   /* Fast path when ProcessUserModeIOPL was already called. */
   if (read_iopl() == 3)