mirror of
https://github.com/radareorg/quickjs.git
synced 2026-11-07 06:25:57 -10:00
Fix discarded qualifiers compilation warning with GCC 15.2
This commit is contained in:
1 parent
83bd236785
commit
4869a1efa9
3 files changed
+6
-8
No files matched your search
@@ -441,7 +441,7 @@ int main(int argc, char **argv)
|
||||
the script */
|
||||
while (optind < argc && *argv[optind] == '-') {
|
||||
char *arg = argv[optind] + 1;
|
||||
const char *longopt = "";
|
||||
char *longopt = "";
|
||||
char *optarg = NULL;
|
||||
/* a single - is not an option, it also stops argument scanning */
|
||||
if (!*arg)
|
||||
|
||||
@@ -419,7 +419,7 @@ int main(int argc, char **argv)
|
||||
|
||||
while (optind < argc && *argv[optind] == '-') {
|
||||
char *arg = argv[optind] + 1;
|
||||
const char *longopt = "";
|
||||
char *longopt = "";
|
||||
char *optarg = NULL;
|
||||
/* a single - is not an option, it also stops argument scanning */
|
||||
if (!*arg)
|
||||
|
||||
+4
-6
@@ -227,9 +227,7 @@ char *skip_prefix(const char *str, const char *prefix)
|
||||
|
||||
char *get_basename(const char *filename)
|
||||
{
|
||||
char *p;
|
||||
|
||||
p = strrchr(filename, '/');
|
||||
const char *p = strrchr(filename, '/');
|
||||
if (!p)
|
||||
return NULL;
|
||||
return strdup_len(filename, p - filename);
|
||||
@@ -1828,10 +1826,10 @@ int run_test(ThreadLocalStorage *tls, const char *filename, int *msec)
|
||||
harness = harness_dir;
|
||||
|
||||
if (!harness) {
|
||||
p = strstr(filename, "test/");
|
||||
if (p) {
|
||||
const char *p1 = strstr(filename, "test/");
|
||||
if (p1) {
|
||||
snprintf(harnessbuf, sizeof(harnessbuf), "%.*s%s",
|
||||
(int)(p - filename), filename, "harness");
|
||||
(int)(p1 - filename), filename, "harness");
|
||||
}
|
||||
harness = harnessbuf;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user