cn-uofbasel / ccn-lite

CCN-lite, a lightweight implementation of the CCNx protocol and its variations
ISC License
74 stars 63 forks source link

fix issues with ccn-lite-riot #298

Closed smlng closed 6 years ago

smlng commented 6 years ago

Contribution description

This PR fixes two issues found when compiling CCN-lite for RIOT on macOS.

first:

/RIOT/examples/ccn-lite-relay/bin/pkg/native/ccn-lite/src/ccnl-riot/src/ccn-lite-riot.c:212:99: error: format specifies type 'int' but the argument has type 'ssize_t' (aka 'long') [-Werror,-Wformat]
                                printf("error: packet buffer full trying to allocate %d bytes\n", buf->datalen);
                                                                                     ~~           ^~~~~~~~~~~~
                                                                                     %zd
1 warning and 1 error generated.

second:

/RIOT/examples/ccn-lite-relay/bin/pkg/native/ccn-lite/src/ccnl-core/src/ccnl-relay.c:906:29: error: address of 'fwd->face->peer' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
            if (&fwd->face->peer) {
            ~~   ~~~~~~~~~~~^~~~
1 warning and 1 error generated.

Note: need to update package version in RIOT.

Issues/PRs references