Fix warnings in resource.c

Internal functions are now static. print_wellknown() is exported
as coap_print_wellknown() to make it accessible from net.c and
for unit tests.
This commit is contained in:
Olaf Bergmann committed 2015-03-04 14:55:26 +01:00
1 parent e297a0ca76
commit 71de08ac5f
2 files changed
+6 -3

No files matched your search

+3
View File
@@ -335,4 +335,7 @@ coap_resource_iterator_init(coap_resource_t *resources,
coap_resource_t *coap_resource_next(coap_iterator_t *ri);
coap_print_status_t coap_print_wellknown(coap_context_t *, unsigned char *, size_t *, size_t, coap_opt_t *);
void coap_handle_failed_notify(coap_context_t *, const coap_address_t *, const str *);
#endif /* _COAP_RESOURCE_H_ */
+3 -3
View File
@@ -177,7 +177,7 @@ coap_resource_next(coap_iterator_t *ri) {
} \
}
int
static int
match(const str *text, const str *pattern, int match_prefix, int match_substring) {
assert(text); assert(pattern);
@@ -235,12 +235,12 @@ match(const str *text, const str *pattern, int match_prefix, int match_substring
*/
#if defined(__GNUC__) && defined(WITHOUT_QUERY_FILTER)
coap_print_status_t
print_wellknown(coap_context_t *context, unsigned char *buf, size_t *buflen,
coap_print_wellknown(coap_context_t *context, unsigned char *buf, size_t *buflen,
size_t offset,
coap_opt_t *query_filter __attribute__ ((unused))) {
#else /* not a GCC */
coap_print_status_t
print_wellknown(coap_context_t *context, unsigned char *buf, size_t *buflen,
coap_print_wellknown(coap_context_t *context, unsigned char *buf, size_t *buflen,
size_t offset, coap_opt_t *query_filter) {
#endif /* GCC */
coap_resource_t *r;