Merge branch 'dl/squelch-maybe-uninitialized'
Squelch false-positive compiler warning. * dl/squelch-maybe-uninitialized: t/unit-tests/clar: fix -Wmaybe-uninitialized with -Og remote: bail early from set_head() if missing remote name
This commit is contained in:
@@ -1474,10 +1474,13 @@ static int set_head(int argc, const char **argv, const char *prefix,
|
|||||||
};
|
};
|
||||||
argc = parse_options(argc, argv, prefix, options,
|
argc = parse_options(argc, argv, prefix, options,
|
||||||
builtin_remote_sethead_usage, 0);
|
builtin_remote_sethead_usage, 0);
|
||||||
if (argc) {
|
|
||||||
strbuf_addf(&b_head, "refs/remotes/%s/HEAD", argv[0]);
|
/* All modes require at least a remote name. */
|
||||||
remote = remote_get(argv[0]);
|
if (!argc)
|
||||||
}
|
usage_with_options(builtin_remote_sethead_usage, options);
|
||||||
|
|
||||||
|
strbuf_addf(&b_head, "refs/remotes/%s/HEAD", argv[0]);
|
||||||
|
remote = remote_get(argv[0]);
|
||||||
|
|
||||||
if (!opt_a && !opt_d && argc == 2) {
|
if (!opt_a && !opt_d && argc == 2) {
|
||||||
head_name = xstrdup(argv[1]);
|
head_name = xstrdup(argv[1]);
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ static void
|
|||||||
clar_run_suite(const struct clar_suite *suite, const char *filter)
|
clar_run_suite(const struct clar_suite *suite, const char *filter)
|
||||||
{
|
{
|
||||||
const struct clar_func *test = suite->tests;
|
const struct clar_func *test = suite->tests;
|
||||||
size_t i, matchlen;
|
size_t i, matchlen = 0;
|
||||||
struct clar_report *report;
|
struct clar_report *report;
|
||||||
int exact = 0;
|
int exact = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user