You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#pragma warning(suppress: 6305) // C6305: PREFast does not know upperBounds was also computed in byte count so it is compatible with "sizeof(QueueItem)".
127
-
while (cur < (upperBounds - sizeof(QueueItem)) && cur->inUse)
159
+
while (cur < upperBounds && cur->inUse)
128
160
{
129
-
#pragma warning(suppress: 6305) // C6305: PREFast does not know cur was also computed in byte count so it is compatible with "sizeof(QueueItem)".
130
-
cur += sizeof(QueueItem);
161
+
cur++; // cur is of type QueueItem*, so ++ moves by sizeof(QueueItem).
131
162
}
132
163
133
-
#pragma warning(suppress: 6305) // C6305: PREFast does not know upperBounds was also computed in byte count so it is compatible with "sizeof(QueueItem)".
134
-
THROW_HR_IF(E_OUTOFMEMORY, cur >= (upperBounds - sizeof(QueueItem)));
164
+
THROW_HR_IF(E_OUTOFMEMORY, cur >= upperBounds);
135
165
return cur;
136
166
}
137
167
138
168
std::wstring m_name;
139
-
QueueItem* m_dataStart{ nullptr };
169
+
QueueItem* m_dataStart{ nullptr };// First "QueueItem" in the shared memory after the head pointer.
0 commit comments