Skip to content

Commit def8708

Browse files
committed
fix: compile -Wunterminated-string-initialization
This options is included by default on GCC 15 with -Wextra. Not really a bug in the codebase as we don't use the null terminator, we use the exact size of the BOM string for appending it. .
1 parent d452df8 commit def8708

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

shell.nix

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
with import (builtins.fetchTarball {
2-
name = "25.05";
3-
url = "https://github.com/NixOS/nixpkgs/archive/refs/tags/25.05.tar.gz";
4-
sha256 = "sha256:1915r28xc4znrh2vf4rrjnxldw2imysz819gzhk9qlrkqanmfsxd";
2+
name = "2025-06-16";
3+
url = "https://github.com/NixOS/nixpkgs/archive/e6f23dc08d3624daab7094b701aa3954923c6bbb.tar.gz";
4+
sha256 = "sha256:0m0xmk8sjb5gv2pq7s8w7qxf7qggqsd3rxzv3xrqkhfimy2x7bnx";
55
}) {};
6-
mkShell {
6+
mkShellNoCC {
77
buildInputs =
88
let
99
xpg = import (fetchFromGitHub { owner = "steve-chavez";
@@ -46,6 +46,7 @@ mkShell {
4646
style
4747
styleCheck
4848
loadtest
49+
gcc15
4950
];
5051
shellHook = ''
5152
export HISTFILE=.history

src/aggs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
const char NEWLINE = '\n';
88
const char DQUOTE = '"';
99
const char CR = '\r';
10-
const char BOM[3] = "\xEF\xBB\xBF";
10+
const char BOM[] = {0xEF, 0xBB, 0xBF};
1111

1212
static inline bool is_reserved(char c) {
1313
return c == DQUOTE || c == NEWLINE || c == CR;

0 commit comments

Comments
 (0)