<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40366 >

auth.c:100: error: ISO C forbids forward references to ‘enum’ types

When compiling with --std=gnu99 -pedantic.  This is an actual error in 
that the code is technically not valid C.  Easily fixed by reordering it.

-jason

Index: server/auth.c
===================================================================
--- server/auth.c	(revision 14981)
+++ server/auth.c	(working copy)
@@ -93,18 +93,6 @@
  * many seconds to reply to the client */
 static const int auth_fail_wait[] = { 1, 1, 2, 3 };
 
-static bool is_good_password(const char *password, char *msg);
-
-static bool authdb_check_password(struct connection *pconn,
-                           const char *password, int len);
-static enum authdb_status auth_db_load(struct connection *pconn);
-static bool auth_db_save(struct connection *pconn);
-
-#ifdef HAVE_AUTH
-static char *alloc_escaped_string(MYSQL *mysql, const char *orig);
-static void free_escaped_string(char *str);
-#endif /* HAVE_AUTH */
-
 /**************************************************
  The auth db statuses are:
 
@@ -119,8 +107,20 @@
   AUTH_DB_NOT_FOUND
 };
 
+static bool is_good_password(const char *password, char *msg);
+
+static bool authdb_check_password(struct connection *pconn,
+                           const char *password, int len);
+static enum authdb_status auth_db_load(struct connection *pconn);
+static bool auth_db_save(struct connection *pconn);
+
 #ifdef HAVE_AUTH
+static char *alloc_escaped_string(MYSQL *mysql, const char *orig);
+static void free_escaped_string(char *str);
+#endif /* HAVE_AUTH */
 
+#ifdef HAVE_AUTH
+
 enum auth_option_source {
   AOS_DEFAULT,  /* Internal default         */
   AOS_FILE,     /* Read from config file    */
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to