]> arthur.barton.de Git - netdata.git/commitdiff
fix compiler warnings on 32bit machines
authorCosta Tsaousis <costa@tsaousis.gr>
Tue, 31 May 2016 21:02:00 +0000 (00:02 +0300)
committerCosta Tsaousis <costa@tsaousis.gr>
Tue, 31 May 2016 21:02:00 +0000 (00:02 +0300)
src/registry.c
src/web_client.c

index f39ce3e2edc2c4350e12173b274a018ffc169b77..21789cca89fe328da1a9f3ad852dfd01aa079804 100644 (file)
@@ -612,7 +612,7 @@ static inline PERSON_URL *registry_person_link_to_url(PERSON *p, MACHINE *m, URL
        else {
                debug(D_REGISTRY, "registry_person_link_to_url('%s', '%s', '%s'): found", p->guid, m->guid, u->url);
                pu->usages++;
-               if(likely(pu->last_t < when)) pu->last_t = when;
+               if(likely(pu->last_t < (uint32_t)when)) pu->last_t = when;
 
                if(pu->machine != m) {
                        MACHINE_URL *mu = dictionary_get(pu->machine->urls, u->url);
@@ -637,7 +637,7 @@ static inline PERSON_URL *registry_person_link_to_url(PERSON *p, MACHINE *m, URL
        }
 
        p->usages++;
-       if(likely(p->last_t < when)) p->last_t = when;
+       if(likely(p->last_t < (uint32_t)when)) p->last_t = when;
 
        if(pu->flags & REGISTRY_URL_FLAGS_EXPIRED) {
                info("registry_person_link_to_url('%s', '%s', '%s'): accessing an expired URL. Re-enabling URL.", p->guid, m->guid, u->url);
@@ -663,14 +663,14 @@ static inline MACHINE_URL *registry_machine_link_to_url(PERSON *p, MACHINE *m, U
        else {
                debug(D_REGISTRY, "registry_machine_link_to_url('%s', '%s', '%s'): found", p->guid, m->guid, u->url);
                mu->usages++;
-               if(likely(mu->last_t < when)) mu->last_t = when;
+               if(likely(mu->last_t < (uint32_t)when)) mu->last_t = when;
        }
 
        //debug(D_REGISTRY, "registry_machine_link_to_url('%s', '%s', '%s'): indexing person in machine", p->guid, m->guid, u->url);
        //dictionary_set(mu->persons, p->guid, p, sizeof(PERSON));
 
        m->usages++;
-       if(likely(m->last_t < when)) m->last_t = when;
+       if(likely(m->last_t < (uint32_t)when)) m->last_t = when;
 
        if(mu->flags & REGISTRY_URL_FLAGS_EXPIRED) {
                info("registry_machine_link_to_url('%s', '%s', '%s'): accessing an expired URL.", p->guid, m->guid, u->url);
index 3a3471ebd3042b297e43a45dcce0fd759bab9219..7a977afef3c28e0305fb967be0c98b0e8ac0956a 100644 (file)
@@ -1837,7 +1837,7 @@ ssize_t web_client_send_chunk_header(struct web_client *w, size_t len)
 {
        debug(D_DEFLATE, "%llu: OPEN CHUNK of %d bytes (hex: %x).", w->id, len, len);
        char buf[1024];
-       sprintf(buf, "%lX\r\n", len);
+       sprintf(buf, "%zX\r\n", len);
        
        ssize_t bytes = send(w->ofd, buf, strlen(buf), 0);
        if(bytes > 0) {