mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
CMake: Add back stricter warnings used in Serenity builds
These used to be enabled in `serenity_compile_options.cmake` for
Serenity builds and were removed in 9b05fb98. This is a slightly more
conservative subset of those, with ones that are enabled by default
omitted.
This should prevent our code quality regressing in the long run.
This commit is contained in:
@@ -19,8 +19,12 @@ else()
|
||||
add_compile_options(-ffp-contract=off)
|
||||
endif()
|
||||
|
||||
add_compile_options(-Wno-invalid-offsetof)
|
||||
add_compile_options(-Wcast-qual)
|
||||
add_compile_options(-Wformat=2)
|
||||
add_compile_options(-Wimplicit-fallthrough)
|
||||
add_compile_options(-Wsuggest-override)
|
||||
|
||||
add_compile_options(-Wno-invalid-offsetof)
|
||||
add_compile_options(-Wno-unknown-warning-option)
|
||||
add_compile_options(-Wno-unused-command-line-argument)
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ ErrorOr<void> JPEGWriter::encode_impl(Stream& stream, auto const& bitmap, Option
|
||||
|
||||
while (cinfo.next_scanline < cinfo.image_height) {
|
||||
auto const* row_ptr = reinterpret_cast<u8 const*>(bitmap.scanline(cinfo.next_scanline));
|
||||
JSAMPROW row_pointer = (JSAMPROW)row_ptr;
|
||||
JSAMPROW row_pointer = const_cast<JSAMPROW>(row_ptr);
|
||||
jpeg_write_scanlines(&cinfo, &row_pointer, 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user