# Files in src/ should quote all strings in error() output, so that
# unexpected input chars like \r etc. don't corrupt the error.
# In edge cases this can be avoided by putting the format string
-# on a separate line to the following arguments.
+# on a separate line to the arguments, or the arguments in parenthesis.
sc_error_quotes:
@cd $(srcdir)/src && GIT_PAGER= git grep -n 'error *(.*%s.*, [^(]*);$$'\
*.c | grep -v ', q' \
# to the compiler that it doesn't return.
sc_die_EXIT_FAILURE:
@cd $(srcdir)/src && GIT_PAGER= git grep -E \
- 'error \(.*_(FAILURE|INVALID)' \
+ 'error \([^?]*EXIT_' \
&& { echo '$(ME): '"Use die() instead of error" 1>&2; \
exit 1; } \
|| :
char const *err = parse_user_spec_warn (userspec, &uid, &gid,
NULL, NULL, &warn);
if (err)
- error (warn ? 0 : EXIT_CANCELED, 0, "%s", err);
+ error (warn ? 0 : EXIT_CANCELED, 0, "%s", (err));
}
/* If no gid is supplied or looked up, do so now.