]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
GCC fixes
authorArran Cudbard-Bell <arr2036@crashant.ubuntu>
Mon, 22 Dec 2014 21:58:14 +0000 (17:58 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 22 Dec 2014 21:59:08 +0000 (16:59 -0500)
12 files changed:
src/lib/radius.c
src/main/command.c
src/main/connection.c
src/main/detail.c
src/main/listen.c
src/main/mainconfig.c
src/main/modules.c
src/main/process.c
src/main/radattr.c
src/main/realms.c
src/modules/proto_dhcp/dhcpd.c
src/modules/rlm_rest/rest.c

index 641ce32eaacc456c0a3b9f50ffa2fee99a18e668..63265cb3eb065771dbd75ed183d647a2aab3892c 100644 (file)
@@ -663,10 +663,6 @@ static void make_tunnel_passwd(uint8_t *output, ssize_t *outlen,
        memcpy(output, passwd, len + 2);
 }
 
-extern int const fr_attr_max_tlv;
-extern int const fr_attr_shift[];
-extern int const fr_attr_mask[];
-
 static int do_next_tlv(VALUE_PAIR const *vp, VALUE_PAIR const *next, int nest)
 {
        unsigned int tlv1, tlv2;
index d09ded8cfbb042f4fd83b84bf87a5b5f9e15eac8..6847c197641e5c1b5ba8c53d3dc05402c2759d51 100644 (file)
@@ -348,8 +348,6 @@ static int command_terminate(UNUSED rad_listen_t *listener,
        return 1;               /* success */
 }
 
-extern time_t fr_start_time;
-
 static int command_uptime(rad_listen_t *listener,
                          UNUSED int argc, UNUSED char *argv[])
 {
index adc8b61f231a87f555af1625768eba920f1db6f4..6f6d69cf4ac2d857c2962eb9650c863f87cb12cb 100644 (file)
@@ -33,8 +33,6 @@ typedef struct fr_connection fr_connection_t;
 
 static int fr_connection_pool_check(fr_connection_pool_t *pool);
 
-extern bool check_config;
-
 #ifndef NDEBUG
 #ifdef HAVE_PTHREAD_H
 /* #define PTHREAD_DEBUG (1) */
index fe93061746e1bf03118b3273e18856718d799ea3..d5dbee37b4e8cf7eb31f53456d1e40a4566a323e 100644 (file)
@@ -41,8 +41,6 @@ RCSID("$Id$")
 
 #ifdef WITH_DETAIL
 
-extern bool check_config;
-
 #define USEC (1000000)
 
 static FR_NAME_NUMBER state_names[] = {
index f197c8d6ac73cd72bf1ec67b8bf8a40539d16cfe..94e284fab60d1074b43aa867ee7f355b64e4b7e0 100644 (file)
@@ -72,15 +72,9 @@ static int command_tcp_send(rad_listen_t *listener, REQUEST *request);
 static int command_write_magic(int newfd, listen_socket_t *sock);
 #endif
 
-#ifdef WITH_TCP
-/*
- *     We want to avoid opening a UDP proxy listener
- *     when all of the home servers are TCP.
- */
-extern bool home_servers_udp;
-#endif
-
-static fr_protocol_t master_listen[RAD_LISTEN_MAX];
+static int last_listener = RAD_LISTEN_MAX;
+#define MAX_LISTENER (256)
+static fr_protocol_t master_listen[MAX_LISTENER];
 
 /*
  *     Xlat for %{listen:foo}
@@ -867,8 +861,6 @@ int common_socket_print(rad_listen_t const *this, char *buffer, size_t bufsize)
        return 1;
 }
 
-extern bool check_config;      /* radiusd.c */
-
 static CONF_PARSER performance_config[] = {
        { "skip_duplicate_checks", FR_CONF_OFFSET(PW_TYPE_BOOLEAN, rad_listen_t, nodup), NULL },
 
index 504234cf4e78f63c5d0353285addc283043c8b73..c8dcef8af608618da337e88e474cfb8c0aa568ea 100644 (file)
@@ -52,7 +52,6 @@ RCSID("$Id$")
 struct main_config_t main_config;
 extern fr_cond_t *debug_condition;
 fr_cond_t *debug_condition;
-extern bool log_dates_utc;
 
 typedef struct cached_config_t {
        struct cached_config_t *next;
index c32ed45d47d4dd04bc1dceb48c9fabd5ba9dc513..24d3b99b97ca3f8dc3fdec9182b898e4d81fcbde 100644 (file)
@@ -30,8 +30,6 @@ RCSID("$Id$")
 #include <freeradius-devel/parser.h>
 #include <freeradius-devel/rad_assert.h>
 
-extern bool check_config;
-
 typedef struct indexed_modcallable {
        rlm_components_t        comp;
        int                     idx;
index de509b85f353c6c8ac739a90be97fb879b834e90..9177a9bb0e097069736e7d1cced056bd59abd576 100644 (file)
@@ -45,7 +45,6 @@ RCSID("$Id$")
 #endif
 
 extern pid_t radius_pid;
-extern bool check_config;
 extern fr_cond_t *debug_condition;
 
 static bool spawn_flag = false;
index 4d49f20cef13b45cf7ed3d89eb91eb3413a5cb71..a1912a264f0f8a5daceeb92843664adfa4ec2f8a 100644 (file)
@@ -39,7 +39,8 @@ typedef struct REQUEST REQUEST;
 #include <assert.h>
 
 #include <freeradius-devel/log.h>
-static log_lvl_t debug_flag = 0;
+extern log_lvl_t debug_flag;
+log_lvl_t debug_flag = 0;
 
 /**********************************************************************
  *     Hacks for xlat
index 00892fad3ff3025b6c6eba4b8b08d87d2be6cb95..7e450c85b91e6259114097e46c58897ba4a12377 100644 (file)
@@ -24,6 +24,7 @@
 RCSID("$Id$")
 
 #include <freeradius-devel/radiusd.h>
+#include <freeradius-devel/realms.h>
 #include <freeradius-devel/rad_assert.h>
 
 #include <sys/stat.h>
@@ -1202,8 +1203,12 @@ static int old_server_add(realm_config_t *rc, CONF_SECTION *cs,
                        cf_log_err_cs(cs, "Inconsistent ldflag for server pool \"%s\"", name);
                        return 0;
                }
-
-               if (pool->server_type != type) {
+               
+               /*
+                *  GCC throws signed comparison warning here without the cast
+                *  very strange...
+                */
+               if ((home_type_t) pool->server_type != type) {
                        cf_log_err_cs(cs, "Inconsistent home server type for server pool \"%s\"", name);
                        return 0;
                }
index 82ec094618251fddc9271ef424171d670fd40a55..c2d54c80baf022873f6c07d9ccd0c42db605731a 100644 (file)
@@ -56,8 +56,6 @@
 #include <sys/ioctl.h>
 #endif
 
-extern bool check_config;      /* @todo globals are bad, m'kay? */
-
 /*
  *     Same contents as listen_socket_t.
  */
index 84277ea48a6d675ee4c62649571ae3aba6af972a..62b21b4688156938872caadeb3fb922eaca06199 100644 (file)
@@ -93,6 +93,7 @@ const http_body_type_t http_body_type_supported[HTTP_BODY_NUM_ENTRIES] = {
  *
  *  #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
  */
+DIAG_OFF(pragmas)
 DIAG_OFF(disabled-macro-expansion)
 #define SET_OPTION(_x, _y)\
 do {\