зеркало из https://github.com/microsoft/git.git
Merge branch 'rt/format-zero-length-fix'
Recently we inadvertently added a few instances of using 0-width format string to functions that we mark as printf-like without any developers noticing. The root cause was that the compiler warning that is triggered by this is almost always useless and we disabled the warning in our developer builds, but not for general public. The new instances have been corrected, and the warning has been resurrected in the developer builds. * rt/format-zero-length-fix: config.mak.dev: re-enable -Wformat-zero-length rebase-interactive.c: silence format-zero-length warnings
This commit is contained in:
Коммит
6125104b88
|
@ -9,7 +9,6 @@ endif
|
|||
DEVELOPER_CFLAGS += -Wall
|
||||
DEVELOPER_CFLAGS += -Wdeclaration-after-statement
|
||||
DEVELOPER_CFLAGS += -Wformat-security
|
||||
DEVELOPER_CFLAGS += -Wno-format-zero-length
|
||||
DEVELOPER_CFLAGS += -Wold-style-definition
|
||||
DEVELOPER_CFLAGS += -Woverflow
|
||||
DEVELOPER_CFLAGS += -Wpointer-arith
|
||||
|
|
|
@ -129,14 +129,14 @@ int edit_todo_list(struct repository *r, struct todo_list *todo_list,
|
|||
|
||||
if (incorrect) {
|
||||
if (todo_list_check_against_backup(r, new_todo)) {
|
||||
write_file(rebase_path_dropped(), "");
|
||||
write_file(rebase_path_dropped(), "%s", "");
|
||||
return -4;
|
||||
}
|
||||
|
||||
if (incorrect > 0)
|
||||
unlink(rebase_path_dropped());
|
||||
} else if (todo_list_check(todo_list, new_todo)) {
|
||||
write_file(rebase_path_dropped(), "");
|
||||
write_file(rebase_path_dropped(), "%s", "");
|
||||
return -4;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче