Skip to content

Commit d7a10c3

Browse files
avargitster
authored andcommitted
Fix an enum assignment issue spotted by Sun Studio
In builtin/fast-export.c we'd assign to variables of the tag_of_filtered_mode enum type with constants defined for the signed_tag_mode enum. We'd get the intended value since both the value we were assigning with and the one we actually wanted had the same positional within their respective enums, but doing it this way makes no sense. This issue was spotted by Sun Studio 12 Update 1: "builtin/fast-export.c", line 54: warning: enum type mismatch: op "=" (E_ENUM_TYPE_MISMATCH_OP) Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3daff7c commit d7a10c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/fast-export.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static const char *fast_export_usage[] = {
2525

2626
static int progress;
2727
static enum { ABORT, VERBATIM, WARN, STRIP } signed_tag_mode = ABORT;
28-
static enum { ERROR, DROP, REWRITE } tag_of_filtered_mode = ABORT;
28+
static enum { ERROR, DROP, REWRITE } tag_of_filtered_mode = ERROR;
2929
static int fake_missing_tagger;
3030
static int use_done_feature;
3131
static int no_data;
@@ -51,7 +51,7 @@ static int parse_opt_tag_of_filtered_mode(const struct option *opt,
5151
const char *arg, int unset)
5252
{
5353
if (unset || !strcmp(arg, "abort"))
54-
tag_of_filtered_mode = ABORT;
54+
tag_of_filtered_mode = ERROR;
5555
else if (!strcmp(arg, "drop"))
5656
tag_of_filtered_mode = DROP;
5757
else if (!strcmp(arg, "rewrite"))

0 commit comments

Comments
 (0)