diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/collections.c | 5 | ||||
-rw-r--r-- | src/lilv_internal.h | 6 | ||||
-rw-r--r-- | src/zix/tree.c | 6 |
3 files changed, 6 insertions, 11 deletions
diff --git a/src/collections.c b/src/collections.c index c2c752a..cec52b3 100644 --- a/src/collections.c +++ b/src/collections.c @@ -23,14 +23,13 @@ #include <stdbool.h> #include <stddef.h> -#include <stdint.h> int lilv_ptr_cmp(const void* a, const void* b, const void* user_data) { (void)user_data; - return (intptr_t)a - (intptr_t)b; + return a < b ? -1 : b < a ? 1 : 0; } int @@ -41,7 +40,7 @@ lilv_resource_node_cmp(const void* a, const void* b, const void* user_data) const SordNode* an = ((const LilvNode*)a)->node; const SordNode* bn = ((const LilvNode*)b)->node; - return (intptr_t)an - (intptr_t)bn; + return an < bn ? -1 : bn < an ? 1 : 0; } /* Generic collection functions */ diff --git a/src/lilv_internal.h b/src/lilv_internal.h index 12b56de..a2c1b2f 100644 --- a/src/lilv_internal.h +++ b/src/lilv_internal.h @@ -45,12 +45,6 @@ extern "C" { # define snprintf _snprintf # endif # endif -# ifndef INFINITY -# define INFINITY DBL_MAX + DBL_MAX -# endif -# ifndef NAN -# define NAN INFINITY - INFINITY -# endif static inline const char* dlerror(void) { diff --git a/src/zix/tree.c b/src/zix/tree.c index 9faf13c..ac12778 100644 --- a/src/zix/tree.c +++ b/src/zix/tree.c @@ -641,8 +641,9 @@ zix_tree_begin(ZixTree* t) } ZixTreeIter* -zix_tree_end(ZixTree* ZIX_UNUSED(t)) +zix_tree_end(ZixTree* t) { + (void)t; return NULL; } @@ -662,8 +663,9 @@ zix_tree_rbegin(ZixTree* t) } ZixTreeIter* -zix_tree_rend(ZixTree* ZIX_UNUSED(t)) +zix_tree_rend(ZixTree* t) { + (void)t; return NULL; } |