Commit 50e26db
committed
fix(ci): GNU-extension array literal + macOS-only basename_r
Two more GCC errors from CI on Ubuntu:
- `cgi.cpp` was passing `(char *[]){NULL}` as argv to `execvp` — a C99
compound literal that GCC accepts in C but not in C++ (the addresses
of the temporary array are then dereferenced by execvp). Replaced
with a proper `char* argv[]` local that carries the script path as
argv[0] (which is what execvp expects anyway).
- `mime_types.cpp::choiceMimeType` called Apple-only `basename_r`, with
`PATH_MAX` from `<libgen.h>`, but the result `bname` was never used.
Deleted the dead code; the function only needs `path.find_last_of('.')`.1 parent 0f5209c commit 50e26db
2 files changed
Lines changed: 4 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
122 | 120 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 121 | + | |
129 | 122 | | |
130 | 123 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 124 | + | |
134 | 125 | | |
135 | 126 | | |
136 | 127 | | |
| |||
0 commit comments