diff options
Diffstat (limited to 'Meta')
49 files changed, 68 insertions, 68 deletions
diff --git a/Meta/Lagom/Fuzzers/EntryShim.cpp b/Meta/Lagom/Fuzzers/EntryShim.cpp index 0b45509a3f..0f9bdc3002 100644 --- a/Meta/Lagom/Fuzzers/EntryShim.cpp +++ b/Meta/Lagom/Fuzzers/EntryShim.cpp @@ -12,9 +12,9 @@ #include <sys/stat.h> #include <unistd.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size); +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size); -int fuzz_from_file(const char* filename) +int fuzz_from_file(char const* filename) { struct stat file_stats; diff --git a/Meta/Lagom/Fuzzers/FuzzASN1.cpp b/Meta/Lagom/Fuzzers/FuzzASN1.cpp index e1dddca082..e232f73a53 100644 --- a/Meta/Lagom/Fuzzers/FuzzASN1.cpp +++ b/Meta/Lagom/Fuzzers/FuzzASN1.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { (void)TLS::Certificate::parse_asn1({ data, size }); diff --git a/Meta/Lagom/Fuzzers/FuzzBMPLoader.cpp b/Meta/Lagom/Fuzzers/FuzzBMPLoader.cpp index f27a2707d5..f581351d14 100644 --- a/Meta/Lagom/Fuzzers/FuzzBMPLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzBMPLoader.cpp @@ -7,7 +7,7 @@ #include <LibGfx/BMPLoader.h> #include <stdio.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { Gfx::BMPImageDecoderPlugin decoder(data, size); (void)decoder.frame(0); diff --git a/Meta/Lagom/Fuzzers/FuzzCyrillicDecoder.cpp b/Meta/Lagom/Fuzzers/FuzzCyrillicDecoder.cpp index 3ac4a172e0..e5160bde57 100644 --- a/Meta/Lagom/Fuzzers/FuzzCyrillicDecoder.cpp +++ b/Meta/Lagom/Fuzzers/FuzzCyrillicDecoder.cpp @@ -9,7 +9,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto* decoder = TextCodec::decoder_for("windows-1251"); VERIFY(decoder); diff --git a/Meta/Lagom/Fuzzers/FuzzDeflateCompression.cpp b/Meta/Lagom/Fuzzers/FuzzDeflateCompression.cpp index 4b8f4a49c4..8e21aa96be 100644 --- a/Meta/Lagom/Fuzzers/FuzzDeflateCompression.cpp +++ b/Meta/Lagom/Fuzzers/FuzzDeflateCompression.cpp @@ -7,7 +7,7 @@ #include <LibCompress/Deflate.h> #include <stdio.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto result = Compress::DeflateCompressor::compress_all(ReadonlyBytes { data, size }); return result.has_value(); diff --git a/Meta/Lagom/Fuzzers/FuzzDeflateDecompression.cpp b/Meta/Lagom/Fuzzers/FuzzDeflateDecompression.cpp index 0d689989fc..b1167f2527 100644 --- a/Meta/Lagom/Fuzzers/FuzzDeflateDecompression.cpp +++ b/Meta/Lagom/Fuzzers/FuzzDeflateDecompression.cpp @@ -7,7 +7,7 @@ #include <LibCompress/Deflate.h> #include <stdio.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto result = Compress::DeflateDecompressor::decompress_all(ReadonlyBytes { data, size }); return result.has_value(); diff --git a/Meta/Lagom/Fuzzers/FuzzELF.cpp b/Meta/Lagom/Fuzzers/FuzzELF.cpp index 41ae8428ff..a8e0eee0e0 100644 --- a/Meta/Lagom/Fuzzers/FuzzELF.cpp +++ b/Meta/Lagom/Fuzzers/FuzzELF.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { ELF::Image elf(data, size, /*verbose_logging=*/false); return 0; diff --git a/Meta/Lagom/Fuzzers/FuzzFlacLoader.cpp b/Meta/Lagom/Fuzzers/FuzzFlacLoader.cpp index 7c32717c47..1364d9efd2 100644 --- a/Meta/Lagom/Fuzzers/FuzzFlacLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzFlacLoader.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto flac_data = ByteBuffer::copy(data, size).release_value(); auto flac = make<Audio::FlacLoaderPlugin>(flac_data); diff --git a/Meta/Lagom/Fuzzers/FuzzGIFLoader.cpp b/Meta/Lagom/Fuzzers/FuzzGIFLoader.cpp index 948214c8f2..f066f445ae 100644 --- a/Meta/Lagom/Fuzzers/FuzzGIFLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzGIFLoader.cpp @@ -11,7 +11,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { Gfx::GIFImageDecoderPlugin gif_decoder(data, size); auto bitmap_or_error = gif_decoder.frame(0); diff --git a/Meta/Lagom/Fuzzers/FuzzGemini.cpp b/Meta/Lagom/Fuzzers/FuzzGemini.cpp index 0b7ad874df..183a383ddd 100644 --- a/Meta/Lagom/Fuzzers/FuzzGemini.cpp +++ b/Meta/Lagom/Fuzzers/FuzzGemini.cpp @@ -10,9 +10,9 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { - auto gemini = StringView(static_cast<const unsigned char*>(data), size); + auto gemini = StringView(static_cast<unsigned char const*>(data), size); (void)Gemini::Document::parse(gemini, {}); return 0; } diff --git a/Meta/Lagom/Fuzzers/FuzzGzipCompression.cpp b/Meta/Lagom/Fuzzers/FuzzGzipCompression.cpp index 239fed7175..db2f23078a 100644 --- a/Meta/Lagom/Fuzzers/FuzzGzipCompression.cpp +++ b/Meta/Lagom/Fuzzers/FuzzGzipCompression.cpp @@ -7,7 +7,7 @@ #include <LibCompress/Gzip.h> #include <stdio.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto result = Compress::GzipCompressor::compress_all(ReadonlyBytes { data, size }); return result.has_value(); diff --git a/Meta/Lagom/Fuzzers/FuzzGzipDecompression.cpp b/Meta/Lagom/Fuzzers/FuzzGzipDecompression.cpp index 13cb1c44e2..00cf7a8b35 100644 --- a/Meta/Lagom/Fuzzers/FuzzGzipDecompression.cpp +++ b/Meta/Lagom/Fuzzers/FuzzGzipDecompression.cpp @@ -7,7 +7,7 @@ #include <LibCompress/Gzip.h> #include <stdio.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto result = Compress::GzipDecompressor::decompress_all(ReadonlyBytes { data, size }); return result.has_value(); diff --git a/Meta/Lagom/Fuzzers/FuzzHebrewDecoder.cpp b/Meta/Lagom/Fuzzers/FuzzHebrewDecoder.cpp index de7fe03562..162dfd6a7c 100644 --- a/Meta/Lagom/Fuzzers/FuzzHebrewDecoder.cpp +++ b/Meta/Lagom/Fuzzers/FuzzHebrewDecoder.cpp @@ -9,7 +9,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto* decoder = TextCodec::decoder_for("windows-1255"); VERIFY(decoder); diff --git a/Meta/Lagom/Fuzzers/FuzzHttpRequest.cpp b/Meta/Lagom/Fuzzers/FuzzHttpRequest.cpp index e0e95fa39e..a16f5170c1 100644 --- a/Meta/Lagom/Fuzzers/FuzzHttpRequest.cpp +++ b/Meta/Lagom/Fuzzers/FuzzHttpRequest.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto request_wrapper = HTTP::HttpRequest::from_raw_request(ReadonlyBytes { data, size }); if (!request_wrapper.has_value()) diff --git a/Meta/Lagom/Fuzzers/FuzzICOLoader.cpp b/Meta/Lagom/Fuzzers/FuzzICOLoader.cpp index b691415ee6..56db322b1b 100644 --- a/Meta/Lagom/Fuzzers/FuzzICOLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzICOLoader.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { Gfx::ICOImageDecoderPlugin decoder(data, size); (void)decoder.frame(0); diff --git a/Meta/Lagom/Fuzzers/FuzzIMAPParser.cpp b/Meta/Lagom/Fuzzers/FuzzIMAPParser.cpp index 32e5a1e420..a5d31df0fa 100644 --- a/Meta/Lagom/Fuzzers/FuzzIMAPParser.cpp +++ b/Meta/Lagom/Fuzzers/FuzzIMAPParser.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto parser = IMAP::Parser(); parser.parse(ByteBuffer::copy(data, size).release_value(), true); diff --git a/Meta/Lagom/Fuzzers/FuzzJPGLoader.cpp b/Meta/Lagom/Fuzzers/FuzzJPGLoader.cpp index 4d3c97aed0..54d54bcdc1 100644 --- a/Meta/Lagom/Fuzzers/FuzzJPGLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzJPGLoader.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { Gfx::JPGImageDecoderPlugin decoder(data, size); (void)decoder.frame(0); diff --git a/Meta/Lagom/Fuzzers/FuzzJs.cpp b/Meta/Lagom/Fuzzers/FuzzJs.cpp index b10b03a54a..602a9d52f8 100644 --- a/Meta/Lagom/Fuzzers/FuzzJs.cpp +++ b/Meta/Lagom/Fuzzers/FuzzJs.cpp @@ -12,9 +12,9 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { - auto js = StringView(static_cast<const unsigned char*>(data), size); + auto js = StringView(static_cast<unsigned char const*>(data), size); auto vm = JS::VM::create(); auto interpreter = JS::Interpreter::create<JS::GlobalObject>(*vm); auto parse_result = JS::Script::parse(js, interpreter->realm()); diff --git a/Meta/Lagom/Fuzzers/FuzzLatin1Decoder.cpp b/Meta/Lagom/Fuzzers/FuzzLatin1Decoder.cpp index bf8a04f384..fefe5d341d 100644 --- a/Meta/Lagom/Fuzzers/FuzzLatin1Decoder.cpp +++ b/Meta/Lagom/Fuzzers/FuzzLatin1Decoder.cpp @@ -9,7 +9,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto* decoder = TextCodec::decoder_for("windows-1252"); VERIFY(decoder); diff --git a/Meta/Lagom/Fuzzers/FuzzLatin2Decoder.cpp b/Meta/Lagom/Fuzzers/FuzzLatin2Decoder.cpp index 1a031f158d..5bdf6c7af0 100644 --- a/Meta/Lagom/Fuzzers/FuzzLatin2Decoder.cpp +++ b/Meta/Lagom/Fuzzers/FuzzLatin2Decoder.cpp @@ -9,7 +9,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto* decoder = TextCodec::decoder_for("iso-8859-2"); VERIFY(decoder); diff --git a/Meta/Lagom/Fuzzers/FuzzMD5.cpp b/Meta/Lagom/Fuzzers/FuzzMD5.cpp index e33f37d835..9ed0aad2ad 100644 --- a/Meta/Lagom/Fuzzers/FuzzMD5.cpp +++ b/Meta/Lagom/Fuzzers/FuzzMD5.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { Crypto::Hash::MD5::hash(data, size); return 0; diff --git a/Meta/Lagom/Fuzzers/FuzzMP3Loader.cpp b/Meta/Lagom/Fuzzers/FuzzMP3Loader.cpp index fd8cecc810..b53fc37731 100644 --- a/Meta/Lagom/Fuzzers/FuzzMP3Loader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzMP3Loader.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto flac_data = ByteBuffer::copy(data, size).release_value(); auto mp3 = make<Audio::MP3LoaderPlugin>(flac_data); diff --git a/Meta/Lagom/Fuzzers/FuzzMarkdown.cpp b/Meta/Lagom/Fuzzers/FuzzMarkdown.cpp index 9e1f0c6f4a..eb18526073 100644 --- a/Meta/Lagom/Fuzzers/FuzzMarkdown.cpp +++ b/Meta/Lagom/Fuzzers/FuzzMarkdown.cpp @@ -10,9 +10,9 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { - auto markdown = StringView(static_cast<const unsigned char*>(data), size); + auto markdown = StringView(static_cast<unsigned char const*>(data), size); (void)Markdown::Document::parse(markdown); return 0; } diff --git a/Meta/Lagom/Fuzzers/FuzzPBMLoader.cpp b/Meta/Lagom/Fuzzers/FuzzPBMLoader.cpp index 24464bbae1..d5244a6ee1 100644 --- a/Meta/Lagom/Fuzzers/FuzzPBMLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzPBMLoader.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { Gfx::PBMImageDecoderPlugin decoder(data, size); (void)decoder.frame(0); diff --git a/Meta/Lagom/Fuzzers/FuzzPDF.cpp b/Meta/Lagom/Fuzzers/FuzzPDF.cpp index b2eb5e701f..7877c677ff 100644 --- a/Meta/Lagom/Fuzzers/FuzzPDF.cpp +++ b/Meta/Lagom/Fuzzers/FuzzPDF.cpp @@ -7,7 +7,7 @@ #include <LibPDF/Document.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { ReadonlyBytes bytes { data, size }; diff --git a/Meta/Lagom/Fuzzers/FuzzPEM.cpp b/Meta/Lagom/Fuzzers/FuzzPEM.cpp index cf950ebda0..8e488fe9ad 100644 --- a/Meta/Lagom/Fuzzers/FuzzPEM.cpp +++ b/Meta/Lagom/Fuzzers/FuzzPEM.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { (void)Crypto::decode_pem({ data, size }); return 0; diff --git a/Meta/Lagom/Fuzzers/FuzzPGMLoader.cpp b/Meta/Lagom/Fuzzers/FuzzPGMLoader.cpp index 4ec226d962..3db44ec53d 100644 --- a/Meta/Lagom/Fuzzers/FuzzPGMLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzPGMLoader.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { Gfx::PGMImageDecoderPlugin decoder(data, size); (void)decoder.frame(0); diff --git a/Meta/Lagom/Fuzzers/FuzzPNGLoader.cpp b/Meta/Lagom/Fuzzers/FuzzPNGLoader.cpp index 848ce18562..54a1b832f0 100644 --- a/Meta/Lagom/Fuzzers/FuzzPNGLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzPNGLoader.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { Gfx::PNGImageDecoderPlugin decoder(data, size); (void)decoder.frame(0); diff --git a/Meta/Lagom/Fuzzers/FuzzPPMLoader.cpp b/Meta/Lagom/Fuzzers/FuzzPPMLoader.cpp index 9b99627b88..30f53592e6 100644 --- a/Meta/Lagom/Fuzzers/FuzzPPMLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzPPMLoader.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { Gfx::PPMImageDecoderPlugin decoder(data, size); (void)decoder.frame(0); diff --git a/Meta/Lagom/Fuzzers/FuzzRSAKeyParsing.cpp b/Meta/Lagom/Fuzzers/FuzzRSAKeyParsing.cpp index 69e19cfea1..b5f7ef4fac 100644 --- a/Meta/Lagom/Fuzzers/FuzzRSAKeyParsing.cpp +++ b/Meta/Lagom/Fuzzers/FuzzRSAKeyParsing.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { Crypto::PK::RSA::parse_rsa_key({ data, size }); return 0; diff --git a/Meta/Lagom/Fuzzers/FuzzRegexECMA262.cpp b/Meta/Lagom/Fuzzers/FuzzRegexECMA262.cpp index 202faf685f..a254b60901 100644 --- a/Meta/Lagom/Fuzzers/FuzzRegexECMA262.cpp +++ b/Meta/Lagom/Fuzzers/FuzzRegexECMA262.cpp @@ -9,9 +9,9 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { - auto pattern = StringView(static_cast<const unsigned char*>(data), size); + auto pattern = StringView(static_cast<unsigned char const*>(data), size); [[maybe_unused]] auto re = Regex<ECMA262>(pattern); return 0; } diff --git a/Meta/Lagom/Fuzzers/FuzzRegexPosixBasic.cpp b/Meta/Lagom/Fuzzers/FuzzRegexPosixBasic.cpp index f66da056b6..83046fdc02 100644 --- a/Meta/Lagom/Fuzzers/FuzzRegexPosixBasic.cpp +++ b/Meta/Lagom/Fuzzers/FuzzRegexPosixBasic.cpp @@ -9,9 +9,9 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { - auto pattern = StringView(static_cast<const unsigned char*>(data), size); + auto pattern = StringView(static_cast<unsigned char const*>(data), size); [[maybe_unused]] auto re = Regex<PosixBasic>(pattern); return 0; } diff --git a/Meta/Lagom/Fuzzers/FuzzRegexPosixExtended.cpp b/Meta/Lagom/Fuzzers/FuzzRegexPosixExtended.cpp index 41a15ce779..13fbc09a1d 100644 --- a/Meta/Lagom/Fuzzers/FuzzRegexPosixExtended.cpp +++ b/Meta/Lagom/Fuzzers/FuzzRegexPosixExtended.cpp @@ -9,9 +9,9 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { - auto pattern = StringView(static_cast<const unsigned char*>(data), size); + auto pattern = StringView(static_cast<unsigned char const*>(data), size); [[maybe_unused]] auto re = Regex<PosixExtended>(pattern); return 0; } diff --git a/Meta/Lagom/Fuzzers/FuzzSHA1.cpp b/Meta/Lagom/Fuzzers/FuzzSHA1.cpp index 08f944edf0..235e117bc6 100644 --- a/Meta/Lagom/Fuzzers/FuzzSHA1.cpp +++ b/Meta/Lagom/Fuzzers/FuzzSHA1.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { Crypto::Hash::SHA1::hash(data, size); return 0; diff --git a/Meta/Lagom/Fuzzers/FuzzSHA256.cpp b/Meta/Lagom/Fuzzers/FuzzSHA256.cpp index 7af6117229..ffa6d07ce1 100644 --- a/Meta/Lagom/Fuzzers/FuzzSHA256.cpp +++ b/Meta/Lagom/Fuzzers/FuzzSHA256.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { Crypto::Hash::SHA256::hash(data, size); return 0; diff --git a/Meta/Lagom/Fuzzers/FuzzSHA384.cpp b/Meta/Lagom/Fuzzers/FuzzSHA384.cpp index 2343860dec..7d46b1b112 100644 --- a/Meta/Lagom/Fuzzers/FuzzSHA384.cpp +++ b/Meta/Lagom/Fuzzers/FuzzSHA384.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { Crypto::Hash::SHA384::hash(data, size); return 0; diff --git a/Meta/Lagom/Fuzzers/FuzzSHA512.cpp b/Meta/Lagom/Fuzzers/FuzzSHA512.cpp index e34980974d..bb07df7d6a 100644 --- a/Meta/Lagom/Fuzzers/FuzzSHA512.cpp +++ b/Meta/Lagom/Fuzzers/FuzzSHA512.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { Crypto::Hash::SHA512::hash(data, size); return 0; diff --git a/Meta/Lagom/Fuzzers/FuzzSQLParser.cpp b/Meta/Lagom/Fuzzers/FuzzSQLParser.cpp index b60df45fff..9d332b9c6f 100644 --- a/Meta/Lagom/Fuzzers/FuzzSQLParser.cpp +++ b/Meta/Lagom/Fuzzers/FuzzSQLParser.cpp @@ -8,7 +8,7 @@ #include <LibSQL/AST/Parser.h> #include <stdio.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto parser = SQL::AST::Parser(SQL::AST::Lexer({ data, size })); [[maybe_unused]] auto statement = parser.next_statement(); diff --git a/Meta/Lagom/Fuzzers/FuzzShell.cpp b/Meta/Lagom/Fuzzers/FuzzShell.cpp index 24b1bbcc6c..9869283e25 100644 --- a/Meta/Lagom/Fuzzers/FuzzShell.cpp +++ b/Meta/Lagom/Fuzzers/FuzzShell.cpp @@ -9,9 +9,9 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { - auto source = StringView(static_cast<const unsigned char*>(data), size); + auto source = StringView(static_cast<unsigned char const*>(data), size); Shell::Parser parser(source); (void)parser.parse(); return 0; diff --git a/Meta/Lagom/Fuzzers/FuzzURL.cpp b/Meta/Lagom/Fuzzers/FuzzURL.cpp index 4c006bd340..9037954eb0 100644 --- a/Meta/Lagom/Fuzzers/FuzzURL.cpp +++ b/Meta/Lagom/Fuzzers/FuzzURL.cpp @@ -6,7 +6,7 @@ #include <AK/URL.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto string_view = StringView(data, size); auto url = URL(string_view); diff --git a/Meta/Lagom/Fuzzers/FuzzUTF16BEDecoder.cpp b/Meta/Lagom/Fuzzers/FuzzUTF16BEDecoder.cpp index 5947b2d7fb..d1e3cf43d5 100644 --- a/Meta/Lagom/Fuzzers/FuzzUTF16BEDecoder.cpp +++ b/Meta/Lagom/Fuzzers/FuzzUTF16BEDecoder.cpp @@ -9,7 +9,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto* decoder = TextCodec::decoder_for("utf-16be"); VERIFY(decoder); diff --git a/Meta/Lagom/Fuzzers/FuzzWAVLoader.cpp b/Meta/Lagom/Fuzzers/FuzzWAVLoader.cpp index 92a183f4b2..f2a767d957 100644 --- a/Meta/Lagom/Fuzzers/FuzzWAVLoader.cpp +++ b/Meta/Lagom/Fuzzers/FuzzWAVLoader.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { if (!data) return 0; diff --git a/Meta/Lagom/Fuzzers/FuzzWasmParser.cpp b/Meta/Lagom/Fuzzers/FuzzWasmParser.cpp index 7bdfe4b6bd..d5c5acbe17 100644 --- a/Meta/Lagom/Fuzzers/FuzzWasmParser.cpp +++ b/Meta/Lagom/Fuzzers/FuzzWasmParser.cpp @@ -10,7 +10,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { ReadonlyBytes bytes { data, size }; InputMemoryStream stream { bytes }; diff --git a/Meta/Lagom/Fuzzers/FuzzZip.cpp b/Meta/Lagom/Fuzzers/FuzzZip.cpp index fe9b62dadf..9d2d669c0a 100644 --- a/Meta/Lagom/Fuzzers/FuzzZip.cpp +++ b/Meta/Lagom/Fuzzers/FuzzZip.cpp @@ -8,7 +8,7 @@ #include <stddef.h> #include <stdint.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto zip_file = Archive::Zip::try_create({ data, size }); if (!zip_file.has_value()) diff --git a/Meta/Lagom/Fuzzers/FuzzZlibDecompression.cpp b/Meta/Lagom/Fuzzers/FuzzZlibDecompression.cpp index 72cbc7399a..19a535931a 100644 --- a/Meta/Lagom/Fuzzers/FuzzZlibDecompression.cpp +++ b/Meta/Lagom/Fuzzers/FuzzZlibDecompression.cpp @@ -7,7 +7,7 @@ #include <LibCompress/Zlib.h> #include <stdio.h> -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) +extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) { auto result = Compress::Zlib::decompress_all(ReadonlyBytes { data, size }); return result.has_value(); diff --git a/Meta/Lagom/Fuzzers/FuzzilliJs.cpp b/Meta/Lagom/Fuzzers/FuzzilliJs.cpp index d96353bb6b..b0a8b221a9 100644 --- a/Meta/Lagom/Fuzzers/FuzzilliJs.cpp +++ b/Meta/Lagom/Fuzzers/FuzzilliJs.cpp @@ -73,7 +73,7 @@ extern "C" void __sanitizer_cov_trace_pc_guard_init(uint32_t* start, uint32_t* s __edges_stop = stop; // Map the shared memory region - const char* shm_key = getenv("SHM_ID"); + char const* shm_key = getenv("SHM_ID"); if (!shm_key) { puts("[COV] no shared memory bitmap available, skipping"); __shmem = (struct shmem_data*)malloc(SHM_SIZE); @@ -205,7 +205,7 @@ int main(int, char**) int result = 0; - auto js = StringView(static_cast<const unsigned char*>(data_buffer.data()), script_size); + auto js = StringView(static_cast<unsigned char const*>(data_buffer.data()), script_size); auto parse_result = JS::Script::parse(js, interpreter->realm()); if (parse_result.is_error()) { diff --git a/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp b/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp index b93e9f9919..36680fbf86 100644 --- a/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp @@ -282,7 +282,7 @@ String constructor_for_message(String const& name, Vector<Parameter> const& para return builder.to_string(); } -void do_message(SourceGenerator message_generator, const String& name, const Vector<Parameter>& parameters, const String& response_type = {}) +void do_message(SourceGenerator message_generator, String const& name, Vector<Parameter> const& parameters, String const& response_type = {}) { auto pascal_name = pascal_case(name); message_generator.set("message.name", name); @@ -598,7 +598,7 @@ public: switch (message_id) {)~~~"); for (auto const& message : endpoint.messages) { - auto do_decode_message = [&](const String& name) { + auto do_decode_message = [&](String const& name) { auto message_generator = generator.fork(); message_generator.set("message.name", name); diff --git a/Meta/Lagom/Tools/CodeGenerators/LibEDID/GeneratePnpIDs.cpp b/Meta/Lagom/Tools/CodeGenerators/LibEDID/GeneratePnpIDs.cpp index 7aee4e4ab6..528d03a2c9 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibEDID/GeneratePnpIDs.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibEDID/GeneratePnpIDs.cpp @@ -125,7 +125,7 @@ static ErrorOr<HashMap<String, PnpIdData>> parse_pnp_ids_database(Core::File& pn HashMap<String, PnpIdData> pnp_id_data; for (size_t row_content_offset = 0;;) { - static const auto row_start_tag = "<tr class=\""sv; + static auto const row_start_tag = "<tr class=\""sv; auto row_start = pnp_ids_file_contents.find(row_start_tag, row_content_offset); if (!row_start.has_value()) break; @@ -134,7 +134,7 @@ static ErrorOr<HashMap<String, PnpIdData>> parse_pnp_ids_database(Core::File& pn if (!row_start_tag_end.has_value()) return Error::from_string_literal("Incomplete row start tag"sv); - static const auto row_end_tag = "</tr>"sv; + static auto const row_end_tag = "</tr>"sv; auto row_end = pnp_ids_file_contents.find(row_end_tag, row_start.value()); if (!row_end.has_value()) return Error::from_string_literal("No matching row end tag found"sv); @@ -145,12 +145,12 @@ static ErrorOr<HashMap<String, PnpIdData>> parse_pnp_ids_database(Core::File& pn auto row_string = pnp_ids_file_contents.substring_view(row_start_tag_end.value() + 1, row_end.value() - row_start_tag_end.value() - 1); Vector<String, (size_t)PnpIdColumns::ColumnCount> columns; for (size_t column_row_offset = 0;;) { - static const auto column_start_tag = "<td>"sv; + static auto const column_start_tag = "<td>"sv; auto column_start = row_string.find(column_start_tag, column_row_offset); if (!column_start.has_value()) break; - static const auto column_end_tag = "</td>"sv; + static auto const column_end_tag = "</td>"sv; auto column_end = row_string.find(column_end_tag, column_start.value() + column_start_tag.length()); if (!column_end.has_value()) return Error::from_string_literal("No matching column end tag found"sv); diff --git a/Meta/Lagom/Tools/CodeGenerators/StateMachineGenerator/main.cpp b/Meta/Lagom/Tools/CodeGenerators/StateMachineGenerator/main.cpp index 2c506fbb36..6651764d0e 100644 --- a/Meta/Lagom/Tools/CodeGenerators/StateMachineGenerator/main.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/StateMachineGenerator/main.cpp @@ -211,12 +211,12 @@ parse_state_machine(StringView input) return state_machine; } -void output_header(const StateMachine&, SourceGenerator&); +void output_header(StateMachine const&, SourceGenerator&); int main(int argc, char** argv) { Core::ArgsParser args_parser; - const char* path = nullptr; + char const* path = nullptr; args_parser.add_positional_argument(path, "Path to parser description", "input", Core::ArgsParser::Required::Yes); args_parser.parse(argc, argv); @@ -235,11 +235,11 @@ int main(int argc, char** argv) return 0; } -HashTable<String> actions(const StateMachine& machine) +HashTable<String> actions(StateMachine const& machine) { HashTable<String> table; - auto do_state = [&](const State& state) { + auto do_state = [&](State const& state) { if (state.entry_action.has_value()) table.set(state.entry_action.value()); if (state.exit_action.has_value()) @@ -257,13 +257,13 @@ HashTable<String> actions(const StateMachine& machine) return table; } -void generate_lookup_table(const StateMachine& machine, SourceGenerator& generator) +void generate_lookup_table(StateMachine const& machine, SourceGenerator& generator) { generator.append(R"~~~( static constexpr StateTransition STATE_TRANSITION_TABLE[][256] = { )~~~"); - auto generate_for_state = [&](const State& s) { + auto generate_for_state = [&](State const& s) { auto table_generator = generator.fork(); table_generator.set("active_state", s.name); table_generator.append("/* @active_state@ */ { "); @@ -295,7 +295,7 @@ void generate_lookup_table(const StateMachine& machine, SourceGenerator& generat )~~~"); } -void output_header(const StateMachine& machine, SourceGenerator& generator) +void output_header(StateMachine const& machine, SourceGenerator& generator) { generator.set("class_name", machine.name); generator.set("initial_state", machine.initial_state); |