Fix warning.
[awesomized/libmemcached] / include / memcached.h
index 023ba425e9ce239ec517a1294a88de5ce5ec1934..6854035b5bd0593544ee5b74e4e4bd206783e621 100644 (file)
@@ -211,11 +211,29 @@ char ** memcached_stat_get_keys(memcached_st *ptr, memcached_stat_st *stat,
                                 memcached_return *error);
 
 /* Some personal debugging functions */
+#ifdef HAVE_DEBUG
 #define WATCHPOINT printf("\nWATCHPOINT %s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
 #define WATCHPOINT_ERROR(A) printf("\nWATCHPOINT %s:%d %s\n", __FILE__, __LINE__, memcached_strerror(NULL, A));fflush(stdout);
 #define WATCHPOINT_STRING(A) printf("\nWATCHPOINT %s:%d (%s) %s\n", __FILE__, __LINE__,__func__,A);fflush(stdout);
-#define WATCHPOINT_NUMBER(A) printf("\nWATCHPOINT %s:%d (%s) %d\n", __FILE__, __LINE__,__func__,A);fflush(stdout);
+#define WATCHPOINT_NUMBER(A) printf("\nWATCHPOINT %s:%d (%s) %zu\n", __FILE__, __LINE__,__func__,(size_t)(A));fflush(stdout);
 #define WATCHPOINT_ERRNO(A) printf("\nWATCHPOINT %s:%d (%s) %s\n", __FILE__, __LINE__,__func__, strerror(A));A= 0;fflush(stdout);
+#define WATCHPOINT_ASSERT(A) assert((A));
+#else
+/*
+#define WATCHPOINT { 1; };
+#define WATCHPOINT_ERROR(A) { 1; };
+#define WATCHPOINT_STRING(A) { 1; };
+#define WATCHPOINT_NUMBER(A) { 1; };
+#define WATCHPOINT_ERRNO(A) { 1; };
+#define WATCHPOINT_ASSERT(A) { 1; };
+*/
+#define WATCHPOINT
+#define WATCHPOINT_ERROR(A)
+#define WATCHPOINT_STRING(A)
+#define WATCHPOINT_NUMBER(A)
+#define WATCHPOINT_ERRNO(A)
+#define WATCHPOINT_ASSERT(A)
+#endif
 
 
 #ifdef __cplusplus