mirror of
https://https.git.savannah.gnu.org/git/diffutils.git
synced 2026-01-26 15:03:22 +00:00
build: suppress -Wmaybe-uninitialized for one function
* src/sdiff.c (edit): Suppress gcc's -Wmaybe-uninitialized warning for this function. Whenever "cmd1 == 'e'", cmd2 **is** initialized.
This commit is contained in:
parent
774b942f70
commit
f1a8c476b6
12
src/sdiff.c
12
src/sdiff.c
@ -842,6 +842,12 @@ flush_line (void)
|
||||
perror_fatal (_("read failed"));
|
||||
}
|
||||
|
||||
/* Suppress gcc's "...may be used before initialized" warnings,
|
||||
generated by GCC versions up to at least GCC 14.0.0 20231227. */
|
||||
#if __GNUC__ + (__GNUC_MINOR__ >= 7) > 4
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
|
||||
/* interpret an edit command */
|
||||
static bool
|
||||
@ -1041,7 +1047,11 @@ edit (struct line_filter *left, char const *lname, lin lline, lin llen,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if __GNUC__ + (__GNUC_MINOR__ >= 7) > 4
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
/* Alternately reveal bursts of diff output and handle user commands. */
|
||||
static bool
|
||||
interact (struct line_filter *diff,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user