fix warnings

This commit is contained in:
2025-09-06 14:02:57 -04:00
parent baf086ab4b
commit a51f8c8075
2 changed files with 12 additions and 5 deletions

View File

@@ -67,7 +67,7 @@ int getopt_long(int argc, char *const argv[], const char *optstring,
}
if (argv[optind][1] == '-') {
const char *arg = argv[optind] + 2;
const char *eq = strchr(arg, '=');
char *eq = strchr(arg, '=');
size_t len = eq ? (size_t)(eq - arg) : strlen(arg);
for (int i = 0; longopts[i].name; i++) {
if (strncmp(arg, longopts[i].name, len) == 0 &&