summaryrefslogtreecommitdiff
path: root/serial/VirtualSerial2/queue.c
diff options
context:
space:
mode:
authorAndrew Yang <[email protected]>2025-01-22 14:44:58 -0800
committerGitHub <[email protected]>2025-01-22 14:44:58 -0800
commitcc8c10376cfb2432342730409644b025129b1a5f (patch)
tree21d7c4207cdccddcc1648ea09f628b98e981ffc1 /serial/VirtualSerial2/queue.c
parentddccabb419c32eb4867c30b73b3df9538b5046a3 (diff)
[serial/VirtualSerial2] Use helper function ReadNoFence to read lineControlRegister to avoid C26837 (#1257)
* Use helper function ReadNoFence() to read lineControlRegister to avoid C26837 https://learn.microsoft.com/en-us/cpp/code-quality/c26837?view=msvc-170
Diffstat (limited to 'serial/VirtualSerial2/queue.c')
-rw-r--r--serial/VirtualSerial2/queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/serial/VirtualSerial2/queue.c b/serial/VirtualSerial2/queue.c
index 83b022de..371ef693 100644
--- a/serial/VirtualSerial2/queue.c
+++ b/serial/VirtualSerial2/queue.c
@@ -717,7 +717,7 @@ QueueProcessGetLineControl(
//
// Take a snapshot of the line control register variable
//
- lineControlSnapshot = *lineControlRegister;
+ lineControlSnapshot = ReadNoFence((LONG *)lineControlRegister);
//
// Decode the word length
@@ -946,7 +946,7 @@ QueueProcessSetLineControl(
#endif
}
- lineControlSnapshot = *lineControlRegister;
+ lineControlSnapshot = ReadNoFence((LONG *)lineControlRegister);
lineControlNew = (lineControlSnapshot & SERIAL_LCR_BREAK) |
(lineControlData | lineControlParity | lineControlStop);