Skip to content

Potentially uninitialized variables in bindview#1373

Merged
5an7y-Microsoft merged 1 commit into
microsoft:mainfrom
andremueiot:user/andremueiot/uninitialized_var_bindview
May 7, 2026
Merged

Potentially uninitialized variables in bindview#1373
5an7y-Microsoft merged 1 commit into
microsoft:mainfrom
andremueiot:user/andremueiot/uninitialized_var_bindview

Conversation

@andremueiot
Copy link
Copy Markdown

Running the Windows Driver Developer Supplemental Tools on bindview with "recommended" and "must-fix" codeql queries results in these warnings in bindview.cpp:

  • 1449 The status of this call to externally defined (SAL) GetCursorPos is not checked, potentially leaving pt uninitialized.
  • 1528 The status of this call to externally defined (SAL) GetCursorPos is not checked, potentially leaving pt uninitialized.
  • 1825 The status of this call to externally defined (SAL) GetDeviceStatus is not checked, potentially leaving ulStatus uninitialized.

These changes eliminate these warnings by initializing the variables mentioned.

These changes eliminate the warnings below in bindview.cpp by initializinf the variables mentioned.

1449 The status of this call to externally defined (SAL) GetCursorPos is not checked, potentially leaving pt uninitialized.
1528 The status of this call to externally defined (SAL) GetCursorPos is not checked, potentially leaving pt uninitialized.
1825 The status of this call to externally defined (SAL) GetDeviceStatus is not checked, potentially leaving ulStatus uninitialized.
@andremueiot andremueiot requested a review from a team as a code owner April 23, 2026 21:39
@andremueiot
Copy link
Copy Markdown
Author

@5an7y-Microsoft , could you please merge this PR? Thanks!

@5an7y-Microsoft 5an7y-Microsoft merged commit be3310a into microsoft:main May 7, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants