Bug 304063
| Summary: | REGRESSION(304354@main) GLIB build failure without assertions due to wrong WARN_UNUSED_RETURN | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Lauro Moura <lmoura> |
| Component: | WebKit Misc. | Assignee: | Lauro Moura <lmoura> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 289787 | ||
Lauro Moura
Error:
In file included from ../../../Source/WTF/wtf/Platform.h:31,
from ../../../Source/WTF/wtf/ExportMacros.h:32,
from ../../../Source/WTF/config.h:26,
from ../../../Source/WTF/wtf/glib/GMallocString.cpp:29:
../../../Source/WTF/wtf/Compiler.h:427:40: error: ‘nodiscard’ attribute can only be applied to functions or to class or enumeration types [-Werror=attributes]
427 | #define WARN_UNUSED_RETURN [[nodiscard]] // NOLINT: check-webkit-style does not understand annotations.
| ^
../../../Source/WTF/wtf/glib/GMallocString.h:98:22: note: in expansion of macro ‘WARN_UNUSED_RETURN’
98 | char* leakUTF8() WARN_UNUSED_RETURN { return byteCast<char>(m_spanWithNullTerminator.leakSpan().data()); }
| ^~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
Patch incoming.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Lauro Moura
Pull request: https://github.com/WebKit/WebKit/pull/55308
EWS
Committed 304358@main (6e51015952ca): <https://commits.webkit.org/304358@main>
Reviewed commits have been landed. Closing PR #55308 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/166386121>
Lauro Moura
Originally, the PR at https://github.com/WebKit/WebKit/pull/55277 (that became 304354@main) used 304328@main, giving a green bubble: https://ews-build.webkit.org/#/builders/5/builds/142781
But the GMallocString.h was added in 304343@main, so we did not have the chance to test both in EWS before landing.