Skip to content

Commit c0b9731

Browse files
bbolligitster
authored andcommitted
packfile: drop a repeated enum declaration
When compiling under Apple LLVM version 9.1.0 (clang-902.0.39.2) with "make DEVELOPER=1 DEVOPTS=pedantic", the compiler says error: redeclaration of already-defined enum 'object_type' is a GNU extension [-Werror,-Wgnu-redeclared-enum] According to https://en.cppreference.com/w/c/language/declarations (section "Redeclaration"), a repeated declaration after the definition is only legal for structs and unions, but not for enums. Drop the belated declaration of enum object_type. It seems that each includer of packfile.h includes the definition of the enum before including packfile.h. Signed-off-by: Beat Bolli <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b7bd948 commit c0b9731

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

packfile.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
/* in object-store.h */
77
struct packed_git;
88
struct object_info;
9-
enum object_type;
109

1110
/*
1211
* Generate the filename to be used for a pack file with checksum "sha1" and

0 commit comments

Comments
 (0)