diff --git a/configure.ac b/configure.ac index 69746214..019003f8 100644 --- a/configure.ac +++ b/configure.ac @@ -846,7 +846,7 @@ else CONFIG_SCRIPTING_SPIDERMONKEY=no fi -CXXFLAGS="$CXXFLAGS -fpermissive -Wno-sign-compare -std=gnu++17" +CXXFLAGS="$CXXFLAGS -fpermissive -Wno-sign-compare" if test "x$CONFIG_ECMASCRIPT_SMJS" = xyes || test "x$CONFIG_SCRIPTING_SPIDERMONKEY" = xyes; then diff --git a/src/terminal/screen.c b/src/terminal/screen.c index 06e8f2f3..bc9ca45a 100644 --- a/src/terminal/screen.c +++ b/src/terminal/screen.c @@ -446,7 +446,9 @@ static INIT_LIST_OF(struct screen_driver, active_screen_drivers); void set_screen_dirty(struct terminal_screen *screen, int from, int to) { - for (unsigned int i = from; i <= to; i++) { + unsigned int i; + + for (i = from; i <= to; i++) { set_bitfield_bit(screen->dirty, i); } screen->was_dirty = 1; diff --git a/src/util/string.c b/src/util/string.c index 77d3db21..3d2c308b 100644 --- a/src/util/string.c +++ b/src/util/string.c @@ -553,6 +553,7 @@ string_replace(struct string *res, struct string *inp, struct string *what, stru char *found; char *ins; char *tmp_cnt; + int i; if (!init_string(&tmp)) { return; @@ -579,7 +580,7 @@ string_replace(struct string *res, struct string *inp, struct string *what, stru ins = tmp_cnt + what->length; } - for (int i=0;isource); // count chars before and after occurence diff --git a/src/util/string.h b/src/util/string.h index e083aa20..4504b6f4 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -187,10 +187,10 @@ struct string { * @relates string */ #ifdef __cplusplus #ifdef DEBUG_MEMLEAK -[[nodiscard]] struct string *init_string__(const char *file, int line, struct string *string); +struct string *init_string__(const char *file, int line, struct string *string); #define init_string(string) init_string__(__FILE__, __LINE__, string) #else -[[nodiscard]] struct string *init_string(struct string *string); +struct string *init_string(struct string *string); #endif #else diff --git a/src/viewer/dump/dump.c b/src/viewer/dump/dump.c index 1adc6fc4..5395cc9d 100644 --- a/src/viewer/dump/dump.c +++ b/src/viewer/dump/dump.c @@ -267,10 +267,11 @@ write_start_of_link(struct link *link, struct dump_output *out) { char buf[D_BUF]; char *where = link->where ?: link->where_img; + char *st; snprintf(buf, D_BUF, "\033]8;;%s\033\\", where); - for (char *st = buf; *st; st++) { + for (st = buf; *st; st++) { write_char(*st, out); } } @@ -279,8 +280,9 @@ static void write_end_of_link(struct dump_output *out) { char buf[] = "\033]8;;\033\\"; + char *st; - for (char *st = buf; *st; st++) { + for (st = buf; *st; st++) { write_char(*st, out); } }