Skip to content

Commit

Permalink
fix debug warnings on OS X - closes appneta#50
Browse files Browse the repository at this point in the history
  • Loading branch information
fklassen committed Jan 10, 2014
1 parent 48606bb commit bac2cff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ check_cache(char *cachedata, COUNTER packetid)

#ifdef DEBUG
dbgx(3, "Index: " COUNTER_SPEC "\tBit: %d\tByte: %hhu\tMask: %hhu", index, bit,
cachedata[index], (cachedata[index] & (char)(1 << bit)));
cachedata[index], (uint8_t)(cachedata[index] & (char)(1 << bit)));
#endif

if (!(cachedata[index] & (char)(1 << bit))) {
Expand Down
2 changes: 1 addition & 1 deletion src/common/get.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ get_layer4_v6(const ipv6_hdr_t *ip6_hdr, const int len)
proto = ip6_hdr->ip_nh;

while (TRUE) {
dbgx(3, "Processing proto: 0x%hx", proto);
dbgx(3, "Processing proto: 0x%hx", (uint16_t)proto);

switch (proto) {
/* recurse due to v6-in-v6, need to recast next as an IPv6 Header */
Expand Down
2 changes: 1 addition & 1 deletion src/tcpedit/checksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ do_checksum(tcpedit_t *tcpedit, uint8_t *data, int proto, int len) {
ipv4 = NULL;

proto = get_ipv6_l4proto(ipv6, len);
dbgx(3, "layer4 proto is 0x%hhu", proto);
dbgx(3, "layer4 proto is 0x%hx", (uint16_t)proto);

ip_hl = (u_char*)get_layer4_v6(ipv6, len) - (u_char*)data;
dbgx(3, "ip_hl proto is 0x%d", ip_hl);
Expand Down

0 comments on commit bac2cff

Please sign in to comment.