Skip to content

Commit

Permalink
[Win] SignalsWin.cpp: error: case value evaluates to 3221225613, whic…
Browse files Browse the repository at this point in the history
…h cannot be narrowed to type 'int'

https://bugs.webkit.org/show_bug.cgi?id=260222

Reviewed by Ross Kirsling.

After 266716@main, clang-cl reports the following error for Windows port.

> WTF\wtf\win\SignalsWin.cpp(82,10): error: case value evaluates to 3221225613, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
>     case EXCEPTION_FLT_DENORMAL_OPERAND:

We shouldn't convert a DWORD signal type to int.

* Source/WTF/wtf/win/SignalsWin.cpp:
(WTF::fromSystemException): Take the argument as a DWORD.

Canonical link: https://commits.webkit.org/266936@main
  • Loading branch information
fujii committed Aug 16, 2023
1 parent 31f34da commit 9487cc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WTF/wtf/win/SignalsWin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ inline void SignalHandlers::forEachHandler(Signal signal, const Func& func) cons
}
}

inline Signal fromSystemException(int signal)
inline Signal fromSystemException(DWORD signal)
{
switch (signal) {
case EXCEPTION_FLT_DENORMAL_OPERAND:
Expand Down

0 comments on commit 9487cc2

Please sign in to comment.