From 4dbe9c1e6afffdf799cb09467262179eb5fa42e4 Mon Sep 17 00:00:00 2001 From: Wei Mao Date: Fri, 16 Aug 2024 09:57:07 -0700 Subject: [serial/VirtualSerial2] Fix issue #1202 --- serial/VirtualSerial2/queue.c | 1 - 1 file changed, 1 deletion(-) (limited to 'serial/VirtualSerial2/queue.c') diff --git a/serial/VirtualSerial2/queue.c b/serial/VirtualSerial2/queue.c index 80571b42..83b022de 100644 --- a/serial/VirtualSerial2/queue.c +++ b/serial/VirtualSerial2/queue.c @@ -173,7 +173,6 @@ RequestCopyToBuffer( return status; } - WdfRequestSetInformation(Request, NumBytesToCopyTo); return status; } -- cgit v1.3.1 From cc8c10376cfb2432342730409644b025129b1a5f Mon Sep 17 00:00:00 2001 From: Andrew Yang <30510259+AndrewYangMSFT@users.noreply.github.com> Date: Wed, 22 Jan 2025 14:44:58 -0800 Subject: [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 --- serial/VirtualSerial2/queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'serial/VirtualSerial2/queue.c') 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); -- cgit v1.3.1