{"thread":{"id":"47536","subject":"[PATCH] utf8.c: mark utf{16,32}_{be,le}_bom symbols static","startedAt":"2018-01-04T17:20:22Z","lastAt":"2018-01-04T17:20:22Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"335825","messageId":"e96a7a50-9d4f-c1d6-ecd7-f967b102b58a@ramsayjones.plus.com","threadId":"47536","inReplyTo":null,"subject":"[PATCH] utf8.c: mark utf{16,32}_{be,le}_bom symbols static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2018-01-04T17:20:13Z","receivedAt":"2018-01-04T17:20:22Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Lars,\n\nIf you need to re-roll your 'ls/checkout-encoding' branch, could you\nplease squash this into the relevant patch (commit d5318db2d0,\n\"utf8: add function to detect prohibited UTF-16/32 BOM\", 2017-12-31).\n\n[yes, noticed by sparse].\n\nThanks!\n\nATB,\nRamsay Jones\n\n utf8.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/utf8.c b/utf8.c\nindex 1978d6c42..f033fec1c 100644\n--- a/utf8.c\n+++ b/utf8.c\n@@ -544,10 +544,10 @@ static int has_bom_prefix(const char *data, size_t len,\n \treturn (len >= bom_len) && !memcmp(data, bom, bom_len);\n }\n \n-const char utf16_be_bom[] = {0xFE, 0xFF};\n-const char utf16_le_bom[] = {0xFF, 0xFE};\n-const char utf32_be_bom[] = {0x00, 0x00, 0xFE, 0xFF};\n-const char utf32_le_bom[] = {0xFF, 0xFE, 0x00, 0x00};\n+static const char utf16_be_bom[] = {0xFE, 0xFF};\n+static const char utf16_le_bom[] = {0xFF, 0xFE};\n+static const char utf32_be_bom[] = {0x00, 0x00, 0xFE, 0xFF};\n+static const char utf32_le_bom[] = {0xFF, 0xFE, 0x00, 0x00};\n \n int has_prohibited_utf_bom(const char *enc, const char *data, size_t len)\n {\n-- \n2.15.0\n"}]}