This patch corrects a set of issues found by the MSVC static analyzer.
Created attachment 239480 [details] Patch
Comment on attachment 239480 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=239480&action=review > Source/WebCore/page/SessionIDHash.h:45 > + static void constructDeletedValue(WebCore::SessionID& slot) { slot = WebCore::SessionID(static_cast<uint64_t>(-2)); } This is confusing even though I know it's correct. Perhaps this is worth pulling out the -2 into a static const variable, and maybe setting it to something like 0xFFFFFFFFFFFFFFFE
(In reply to comment #2) > (From update of attachment 239480 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=239480&action=review > > > Source/WebCore/page/SessionIDHash.h:45 > > + static void constructDeletedValue(WebCore::SessionID& slot) { slot = WebCore::SessionID(static_cast<uint64_t>(-2)); } > > This is confusing even though I know it's correct. Perhaps this is worth pulling out the -2 into a static const variable, and maybe setting it to something like 0xFFFFFFFFFFFFFFFE Yeah, we have a few places where an unsigned value is initialized with a negative number as a sentinel value... I'm not sure what the right thing to do is in this case.
Comment on attachment 239480 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=239480&action=review >> Source/WebCore/page/SessionIDHash.h:45 >> + static void constructDeletedValue(WebCore::SessionID& slot) { slot = WebCore::SessionID(static_cast<uint64_t>(-2)); } > > This is confusing even though I know it's correct. Perhaps this is worth pulling out the -2 into a static const variable, and maybe setting it to something like 0xFFFFFFFFFFFFFFFE I agree with Myles that it is weird looking.
Committed r174465: <http://trac.webkit.org/changeset/174465>