diff options
author | Beat Bolli <dev+git@drbeat.li> | 2018-07-25 23:56:07 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-26 10:36:26 -0700 |
commit | b42f98af096bfdf90339def75fe969b9d969b0f6 (patch) | |
tree | 93c9bcae0c184a0c652ff6c921538c2faf9469b2 /t/t4013/diff.rev-list_--children_HEAD | |
parent | Third batch for 2.19 cycle (diff) | |
download | tgif-b42f98af096bfdf90339def75fe969b9d969b0f6.tar.xz |
packfile: ensure that enum object_type is defined
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 and include cache.h
instead to make sure the enum is defined.
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.rev-list_--children_HEAD')
0 files changed, 0 insertions, 0 deletions