Skip to content

Commit

Permalink
fixed rpm build; (netdata#4503)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsaou authored Oct 26, 2018
1 parent c6cce6b commit bcdfedb
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 2 deletions.
2 changes: 2 additions & 0 deletions backends/backends.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ calculated_number backend_calculate_value_from_stored_data(
, time_t *last_timestamp // the timestamp that should be reported to backend
) {
RRDHOST *host = st->rrdhost;
(void)host;

// find the edges of the rrd database for this chart
time_t first_t = rrdset_first_entry_t(st);
Expand Down Expand Up @@ -170,6 +171,7 @@ static SIMPLE_PATTERN *hosts_pattern = NULL;

inline int backends_can_send_rrdset(BACKEND_OPTIONS backend_options, RRDSET *st) {
RRDHOST *host = st->rrdhost;
(void)host;

if(unlikely(rrdset_flag_check(st, RRDSET_FLAG_BACKEND_IGNORE)))
return 0;
Expand Down
3 changes: 3 additions & 0 deletions database/rrddimvar.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ static inline void rrddimvar_create_variables(RRDDIMVAR *rs) {

RRDDIMVAR *rrddimvar_create(RRDDIM *rd, RRDVAR_TYPE type, const char *prefix, const char *suffix, void *value, RRDVAR_OPTIONS options) {
RRDSET *st = rd->rrdset;
(void)st;

debug(D_VARIABLES, "RRDDIMSET create for chart id '%s' name '%s', dimension id '%s', name '%s%s%s'", st->id, st->name, rd->id, (prefix)?prefix:"", rd->name, (suffix)?suffix:"");

Expand All @@ -179,6 +180,8 @@ RRDDIMVAR *rrddimvar_create(RRDDIM *rd, RRDVAR_TYPE type, const char *prefix, co

void rrddimvar_rename_all(RRDDIM *rd) {
RRDSET *st = rd->rrdset;
(void)st;

debug(D_VARIABLES, "RRDDIMSET rename for chart id '%s' name '%s', dimension id '%s', name '%s'", st->id, st->name, rd->id, rd->name);

RRDDIMVAR *rs, *next = rd->variables;
Expand Down
4 changes: 4 additions & 0 deletions database/rrdset.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ inline void rrdset_isnot_obsolete(RRDSET *st) {

inline void rrdset_update_heterogeneous_flag(RRDSET *st) {
RRDHOST *host = st->rrdhost;
(void)host;

RRDDIM *rd;

rrdset_flag_clear(st, RRDSET_FLAG_HOMEGENEOUS_CHECK);
Expand Down Expand Up @@ -930,6 +932,8 @@ static inline size_t rrdset_done_interpolate(
size_t stored_entries = 0; // the number of entries we have stored in the db, during this call to rrdset_done()

usec_t first_ut = last_stored_ut, last_ut = 0;
(void)first_ut;

ssize_t iterations = (ssize_t)((now_collect_ut - last_stored_ut) / (update_every_ut));
if((now_collect_ut % (update_every_ut)) == 0) iterations++;

Expand Down
11 changes: 11 additions & 0 deletions libnetdata/locks/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ int __netdata_mutex_unlock(netdata_mutex_t *mutex) {

int netdata_mutex_init_debug( const char *file, const char *function, const unsigned long line, netdata_mutex_t *mutex) {
usec_t start = 0;
(void)start;

if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
Expand All @@ -99,6 +100,7 @@ int netdata_mutex_init_debug( const char *file, const char *function, const unsi

int netdata_mutex_lock_debug( const char *file, const char *function, const unsigned long line, netdata_mutex_t *mutex) {
usec_t start = 0;
(void)start;

if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
Expand All @@ -114,6 +116,7 @@ int netdata_mutex_lock_debug( const char *file, const char *function, const unsi

int netdata_mutex_trylock_debug( const char *file, const char *function, const unsigned long line, netdata_mutex_t *mutex) {
usec_t start = 0;
(void)start;

if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
Expand All @@ -129,6 +132,7 @@ int netdata_mutex_trylock_debug( const char *file, const char *function, const u

int netdata_mutex_unlock_debug( const char *file, const char *function, const unsigned long line, netdata_mutex_t *mutex) {
usec_t start = 0;
(void)start;

if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
Expand Down Expand Up @@ -217,6 +221,7 @@ int __netdata_rwlock_trywrlock(netdata_rwlock_t *rwlock) {

int netdata_rwlock_destroy_debug( const char *file, const char *function, const unsigned long line, netdata_rwlock_t *rwlock) {
usec_t start = 0;
(void)start;

if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
Expand All @@ -232,6 +237,7 @@ int netdata_rwlock_destroy_debug( const char *file, const char *function, const

int netdata_rwlock_init_debug( const char *file, const char *function, const unsigned long line, netdata_rwlock_t *rwlock) {
usec_t start = 0;
(void)start;

if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
Expand All @@ -247,6 +253,7 @@ int netdata_rwlock_init_debug( const char *file, const char *function, const uns

int netdata_rwlock_rdlock_debug( const char *file, const char *function, const unsigned long line, netdata_rwlock_t *rwlock) {
usec_t start = 0;
(void)start;

if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
Expand All @@ -262,6 +269,7 @@ int netdata_rwlock_rdlock_debug( const char *file, const char *function, const u

int netdata_rwlock_wrlock_debug( const char *file, const char *function, const unsigned long line, netdata_rwlock_t *rwlock) {
usec_t start = 0;
(void)start;

if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
Expand All @@ -277,6 +285,7 @@ int netdata_rwlock_wrlock_debug( const char *file, const char *function, const u

int netdata_rwlock_unlock_debug( const char *file, const char *function, const unsigned long line, netdata_rwlock_t *rwlock) {
usec_t start = 0;
(void)start;

if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
Expand All @@ -292,6 +301,7 @@ int netdata_rwlock_unlock_debug( const char *file, const char *function, const u

int netdata_rwlock_tryrdlock_debug( const char *file, const char *function, const unsigned long line, netdata_rwlock_t *rwlock) {
usec_t start = 0;
(void)start;

if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
Expand All @@ -307,6 +317,7 @@ int netdata_rwlock_tryrdlock_debug( const char *file, const char *function, cons

int netdata_rwlock_trywrlock_debug( const char *file, const char *function, const unsigned long line, netdata_rwlock_t *rwlock) {
usec_t start = 0;
(void)start;

if(unlikely(debug_flags & D_LOCKS)) {
start = now_boottime_usec();
Expand Down
1 change: 1 addition & 0 deletions libnetdata/procfile/procfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ procfile *procfile_reopen(procfile *ff, const char *filename, const char *separa
void procfile_print(procfile *ff) {
size_t lines = procfile_lines(ff), l;
char *s;
(void)s;

debug(D_PROCFILE, "File '%s' with %zu lines and %zu words", procfile_filename(ff), ff->lines->len, ff->words->len);

Expand Down
4 changes: 4 additions & 0 deletions libnetdata/socket/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,8 @@ static inline int connect_to_this_ip46(int protocol, int socktype, const char *h

case PF_INET6: {
struct sockaddr_in6 *pSadrIn6 = (struct sockaddr_in6 *) ai->ai_addr;
(void)pSadrIn6;

debug(D_CONNECT_TO,"ai_addr = sin6_family: %d (AF_INET = %d, AF_INET6 = %d), sin6_addr: '%s', sin6_port: '%s', sin6_flowinfo: %u, sin6_scope_id: %u",
pSadrIn6->sin6_family,
AF_INET,
Expand Down Expand Up @@ -1431,6 +1433,8 @@ void poll_events(LISTEN_SOCKETS *sockets

usec_t timer_usec = timer_milliseconds * USEC_PER_MS;
usec_t now_usec = 0, next_timer_usec = 0, last_timer_usec = 0;
(void)last_timer_usec;

if(unlikely(timer_usec)) {
now_usec = now_boottime_usec();
next_timer_usec = now_usec - (now_usec % timer_usec) + timer_usec;
Expand Down
2 changes: 2 additions & 0 deletions streaming/rrdpush.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ static int rrdpush_sender_thread_custom_host_variables_callback(void *rrdvar_ptr

static void rrdpush_sender_thread_send_custom_host_variables(RRDHOST *host) {
int ret = rrdvar_callback_for_all_host_variables(host, rrdpush_sender_thread_custom_host_variables_callback, host);
(void)ret;

debug(D_STREAM, "RRDVAR sent %d VARIABLES", ret);
}

Expand Down
3 changes: 2 additions & 1 deletion web/api/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
AUTOMAKE_OPTIONS = subdir-objects
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in

SUBDIR = \
SUBDIRS = \
badges \
queries \
exporters \
$(NULL)

dist_noinst_DATA = \
Expand Down
5 changes: 5 additions & 0 deletions web/api/exporters/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
AUTOMAKE_OPTIONS = subdir-objects
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in

SUBDIRS = \
shell \
prometheus \
$(NULL)

dist_noinst_DATA = \
README.md \
$(NULL)
2 changes: 2 additions & 0 deletions web/api/queries/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in

SUBDIRS = \
average \
des \
incremental_sum \
max \
min \
sum \
median \
ses \
stddev \
$(NULL)

Expand Down
3 changes: 2 additions & 1 deletion web/api/queries/query.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ static inline void do_dimension(
// ----------------------------------------------------------------------------
// fill RRDR for the whole chart


#ifdef NETDATA_INTERNAL_CHECKS
static void rrd2rrdr_log_request_response_metdata(RRDR *r
, RRDR_GROUPING group_method
, int aligned
Expand Down Expand Up @@ -571,6 +571,7 @@ static void rrd2rrdr_log_request_response_metdata(RRDR *r
, msg
);
}
#endif // NETDATA_INTERNAL_CHECKS

RRDR *rrd2rrdr(
RRDSET *st
Expand Down
2 changes: 2 additions & 0 deletions web/server/static/static-threaded.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ static void web_server_del_callback(POLLINFO *pi) {
w->pollinfo_slot = 0;
if(unlikely(w->pollinfo_filecopy_slot)) {
POLLINFO *fpi = pollinfo_from_slot(pi->p, w->pollinfo_filecopy_slot); // POLLINFO of the client socket
(void)fpi;

debug(D_WEB_CLIENT, "%llu: THE CLIENT WILL BE FRED BY READING FILE JOB ON FD %d", w->id, fpi->fd);
}
else {
Expand Down
4 changes: 4 additions & 0 deletions web/server/web_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,8 @@ ssize_t web_client_read_file(struct web_client *w)
ssize_t bytes = read(w->ifd, &w->response.data->buffer[w->response.data->len], (size_t)left);
if(likely(bytes > 0)) {
size_t old = w->response.data->len;
(void)old;

w->response.data->len += bytes;
w->response.data->buffer[w->response.data->len] = '\0';

Expand Down Expand Up @@ -1646,6 +1648,8 @@ ssize_t web_client_receive(struct web_client *w)
w->stats_received_bytes += bytes;

size_t old = w->response.data->len;
(void)old;

w->response.data->len += bytes;
w->response.data->buffer[w->response.data->len] = '\0';

Expand Down

0 comments on commit bcdfedb

Please sign in to comment.