Browse Source

Missing extern (#7877)

* missing_extern: Fix missing

Fix few externs that were missing in global variables

* missing_extern: Variables

This commit declares the variables inside .c files
thiagoftsm 5 years ago
parent
commit
93631017d8

+ 1 - 1
daemon/common.c

@@ -13,4 +13,4 @@ char *netdata_configured_varlib_dir          = VARLIB_DIR;
 char *netdata_configured_home_dir            = CACHE_DIR;
 char *netdata_configured_host_prefix         = NULL;
 char *netdata_configured_timezone            = NULL;
-
+int netdata_ready;

+ 1 - 1
daemon/common.h

@@ -84,6 +84,6 @@ extern char *netdata_configured_timezone;
 extern int netdata_zero_metrics_enabled;
 extern int netdata_anonymous_statistics_enabled;
 
-int netdata_ready;
+extern int netdata_ready;
 
 #endif /* NETDATA_COMMON_H */

+ 1 - 0
health/health.c

@@ -9,6 +9,7 @@ struct health_cmdapi_thread_status {
 };
 
 unsigned int default_health_enabled = 1;
+char *silencers_filename;
 
 // ----------------------------------------------------------------------------
 // health initialization

+ 1 - 1
health/health.h

@@ -52,7 +52,7 @@ extern unsigned int default_health_enabled;
 
 #define HEALTH_SILENCERS_MAX_FILE_LEN 10000
 
-char *silencers_filename;
+extern char *silencers_filename;
 
 extern void health_init(void);
 extern void *health_main(void *ptr);

+ 2 - 0
libnetdata/health/health.c

@@ -1,5 +1,7 @@
 #include "health.h"
 
+SILENCERS *silencers;
+
 /**
  * Create Silencer
  *

+ 1 - 1
libnetdata/health/health.h

@@ -44,7 +44,7 @@ typedef struct silencers {
     SILENCER *silencers;
 } SILENCERS;
 
-SILENCERS *silencers;
+extern SILENCERS *silencers;
 
 extern SILENCER *create_silencer(void);
 extern int health_silencers_json_read_callback(JSON_ENTRY *e);

+ 2 - 0
web/api/web_api_v1.c

@@ -2,6 +2,8 @@
 
 #include "web_api_v1.h"
 
+char *api_secret;
+
 static struct {
     const char *name;
     uint32_t hash;

+ 1 - 1
web/api/web_api_v1.h

@@ -29,6 +29,6 @@ extern void host_labels2json(RRDHOST *host, BUFFER *wb, size_t indentation);
 extern void web_client_api_v1_init(void);
 extern void web_client_api_v1_management_init(void);
 
-char *api_secret;
+extern char *api_secret;
 
 #endif //NETDATA_WEB_API_V1_H