@cryptotaxi247 / netdata-1 / commits / 6e99dd653

fix compiler warnings on 32bit machines

Costa Tsaousis committed Jun 1, 2016 at 00:02 UTC 6e99dd653a76b2b6077439433a65902c43dffc40
2 files changed +5 -5
src/registry.c
+4 -4
@@ -612,7 +612,7 @@ static inline PERSON_URL *registry_person_link_to_url(PERSON *p, MACHINE *m, URL
612 else {
613 debug(D_REGISTRY, "registry_person_link_to_url('%s', '%s', '%s'): found", p->guid, m->guid, u->url);
614 pu->usages++;
615 - if(likely(pu->last_t < when)) pu->last_t = when;
615 + if(likely(pu->last_t < (uint32_t)when)) pu->last_t = when;
616
617 if(pu->machine != m) {
618 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
637 }
638
639 p->usages++;
640 - if(likely(p->last_t < when)) p->last_t = when;
640 + if(likely(p->last_t < (uint32_t)when)) p->last_t = when;
641
642 if(pu->flags & REGISTRY_URL_FLAGS_EXPIRED) {
643 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
663 else {
664 debug(D_REGISTRY, "registry_machine_link_to_url('%s', '%s', '%s'): found", p->guid, m->guid, u->url);
665 mu->usages++;
666 - if(likely(mu->last_t < when)) mu->last_t = when;
666 + if(likely(mu->last_t < (uint32_t)when)) mu->last_t = when;
667 }
668
669 //debug(D_REGISTRY, "registry_machine_link_to_url('%s', '%s', '%s'): indexing person in machine", p->guid, m->guid, u->url);
670 //dictionary_set(mu->persons, p->guid, p, sizeof(PERSON));
671
672 m->usages++;
673 - if(likely(m->last_t < when)) m->last_t = when;
673 + if(likely(m->last_t < (uint32_t)when)) m->last_t = when;
674
675 if(mu->flags & REGISTRY_URL_FLAGS_EXPIRED) {
676 info("registry_machine_link_to_url('%s', '%s', '%s'): accessing an expired URL.", p->guid, m->guid, u->url);
src/web_client.c
+1 -1
@@ -1837,7 +1837,7 @@ ssize_t web_client_send_chunk_header(struct web_client *w, size_t len)
1837 {
1838 debug(D_DEFLATE, "%llu: OPEN CHUNK of %d bytes (hex: %x).", w->id, len, len);
1839 char buf[1024];
1840 - sprintf(buf, "%lX\r\n", len);
1840 + sprintf(buf, "%zX\r\n", len);
1841
1842 ssize_t bytes = send(w->ofd, buf, strlen(buf), 0);
1843 if(bytes > 0) {