Commit b42f98af authored by Beat Bolli's avatar Beat Bolli Committed by Junio C Hamano

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
(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: default avatarJonathan Nieder <>
Signed-off-by: default avatarBeat Bolli <>
Reviewed-by: default avatarJonathan Nieder <>
Signed-off-by: default avatarJunio C Hamano <>
parent b7bd9486
#ifndef PACKFILE_H
#define PACKFILE_H
#include "cache.h"
#include "oidset.h"
/* in object-store.h */
struct packed_git;
struct object_info;
enum object_type;
* Generate the filename to be used for a pack file with checksum "sha1" and
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment