Skip to content

Commit

Permalink
[SQUASH ME] fixed some cpp check warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
BytesGalore authored and BytesGalore committed Feb 13, 2015
1 parent 1e5cc24 commit 49bdd2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions sys/net/network_layer/fib/fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "thread.h"
#include "mutex.h"
#include "msg.h"

#define ENABLE_DEBUG (0)
#include "debug.h"

#include "fib/fib.h"
Expand Down Expand Up @@ -246,7 +248,7 @@ static void fib_signal_rrp(uint8_t *glob_dst, size_t glob_dst_size)
for (size_t i = 0; i < FIB_MAX_RRP; ++i) {
if (notify_rrp[i] != KERNEL_PID_UNDEF) {
DEBUG("[fib_signal_rrp] send msg@: %p to pid[%d]: %d\n",\
msg.content.ptr, i, notify_rrp[i]);
msg.content.ptr, (int)i, (int)notify_rrp[i]);

/* the receiver, i.e. the RRP, MUST copy the content value
* using the provided pointer after the msg_reply() call
Expand All @@ -266,10 +268,8 @@ int fib_table_add_entry(kernel_pid_t iface_id, uint8_t *glob_dst, size_t glob_ds
DEBUG("[fib_table_add_entry]");
size_t count = 1;
fib_entry_t *entry[count];
int ret = FIB_SUCCESS;

//ret = fib_update_entry(entry[0], iface_id, next_hop, next_hop_size, lifetime);
ret = fib_find_entry(glob_dst, glob_dst_size, &(entry[0]), &count);
int ret = fib_find_entry(glob_dst, glob_dst_size, &(entry[0]), &count);

if ( ret == FIB_SUCCESS_EXACT_MATCH ) {
/* we must take the according entry and update the values */
Expand Down
12 changes: 7 additions & 5 deletions sys/net/network_layer/fib/universal_address.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include <stdlib.h>
#include <string.h>
#include "mutex.h"

#define ENABLE_DEBUG (0)
#include "debug.h"
#include "fib/universal_address.h"

Expand Down Expand Up @@ -116,7 +118,7 @@ universal_address_container_t *universal_address_add(uint8_t *addr, size_t addr_

if (pEntry->use_count == 1) {
DEBUG("[universal_address_add] universal_address_table_filled: %d\n", \
universal_address_table_filled);
(int)universal_address_table_filled);
universal_address_table_filled++;
}

Expand All @@ -140,7 +142,7 @@ void universal_address_rem(universal_address_container_t *entry)
}
else {
DEBUG("[universal_address_rem] universal_address_table_filled: %d\n", \
universal_address_table_filled);
(int)universal_address_table_filled);
}
}

Expand Down Expand Up @@ -227,10 +229,10 @@ void universal_address_print_entry(universal_address_container_t *entry)
if (entry != NULL) {
printf("[universal_address_print_entry] entry@: %p, use_count: %d, \
address_size: %d, content: ", \
(void *)entry, entry->use_count, entry->address_size);
(void *)entry, (int)entry->use_count, (int)entry->address_size);

for (size_t i = 0; i < entry->address_size; ++i) {
//printf("%02x ", (char)entry->address[i]);
/* printf("%02x ", (char)entry->address[i]); */
printf("%c", (char)entry->address[i]);
}

Expand All @@ -243,7 +245,7 @@ address_size: %d, content: ", \
void universal_address_print_table(void)
{
printf("[universal_address_print_table] universal_address_table_filled: %d\n", \
universal_address_table_filled);
(int)universal_address_table_filled);

for (size_t i = 0; i < UNIVERSAL_ADDRESS_MAX_ENTRIES; ++i) {
universal_address_print_entry((&universal_address_table[i]));
Expand Down

0 comments on commit 49bdd2c

Please sign in to comment.