[master] 68644d8 Strictly speaking it is not legal to forward declare an enum.
Poul-Henning Kamp
phk at varnish-cache.org
Wed Oct 10 10:41:01 CEST 2012
commit 68644d8b0eb6af4efd92ac30ddf59b72de5829bc
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Oct 10 08:40:43 2012 +0000
Strictly speaking it is not legal to forward declare an enum.
diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index b6c33cb..6d4fe86 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -192,11 +192,6 @@ enum httpwhence {
* Ban info event types
*/
-enum baninfo {
- BI_NEW,
- BI_DROP
-};
-
/* NB: remember to update http_Copy() if you add fields */
struct http {
unsigned magic;
diff --git a/bin/varnishd/common/common.h b/bin/varnishd/common/common.h
index f665e52..8140734 100644
--- a/bin/varnishd/common/common.h
+++ b/bin/varnishd/common/common.h
@@ -40,6 +40,16 @@
#include "vqueue.h"
#include "vsb.h"
+/*
+ * Enums cannot be forward declared (any more...) so put it here
+ * to make everybody see it.
+ */
+
+enum baninfo {
+ BI_NEW,
+ BI_DROP
+};
+
struct cli;
/**********************************************************************
diff --git a/bin/varnishd/storage/storage.h b/bin/varnishd/storage/storage.h
index e4a02c1..e9971e7 100644
--- a/bin/varnishd/storage/storage.h
+++ b/bin/varnishd/storage/storage.h
@@ -38,7 +38,6 @@ struct busyobj;
struct objcore;
struct worker;
struct lru;
-enum baninfo;
typedef void storage_init_f(struct stevedore *, int ac, char * const *av);
typedef void storage_open_f(const struct stevedore *);
More information about the varnish-commit
mailing list