[master] 118ac4ed1 define enum before using it

Nils Goroll nils.goroll at uplex.de
Thu Apr 18 16:26:08 UTC 2019


commit 118ac4ed1326e9d1c7e54df8c406f2b5c77e79fb
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Thu Apr 18 18:25:28 2019 +0200

    define enum before using it
    
    exotic compilers complain about incomplete type

diff --git a/bin/varnishd/cache/cache_varnishd.h b/bin/varnishd/cache/cache_varnishd.h
index f5c4bf656..b3f766080 100644
--- a/bin/varnishd/cache/cache_varnishd.h
+++ b/bin/varnishd/cache/cache_varnishd.h
@@ -79,6 +79,11 @@ struct http_conn {
 	vtim_dur		between_bytes_timeout;
 };
 
+enum htc_status_e {
+#define HTC_STATUS(e, n, s, l) HTC_S_ ## e = n,
+#include "tbl/htc.h"
+};
+
 typedef enum htc_status_e htc_complete_f(struct http_conn *);
 
 /* -------------------------------------------------------------------*/
@@ -382,12 +387,6 @@ enum htc_status_e HTC_RxStuff(struct http_conn *, htc_complete_f *,
 #include "tbl/sess_attr.h"
 void SES_Set_String_Attr(struct sess *sp, enum sess_attr a, const char *src);
 
-
-enum htc_status_e {
-#define HTC_STATUS(e, n, s, l) HTC_S_ ## e = n,
-#include "tbl/htc.h"
-};
-
 /* cache_shmlog.c */
 extern struct VSC_main *VSC_C_main;
 void VSM_Init(void);


More information about the varnish-commit mailing list