From: Wilfried Göesgens Date: Thu, 24 Jun 2010 22:28:22 +0000 (+0000) Subject: * clean up warnings, especialy on 64 bit X-Git-Tag: v7.86~128 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=687eeb8b47af316bf102ae0ba9c8e3e400bd38b3 * clean up warnings, especialy on 64 bit --- diff --git a/webcit/configure.ac b/webcit/configure.ac index 5fe05bc1f..56aa70347 100644 --- a/webcit/configure.ac +++ b/webcit/configure.ac @@ -122,6 +122,13 @@ dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_OFF_T AC_TYPE_SIZE_T +dnl Check the size of various builtin types; see typesize.h (error) +AC_CHECK_SIZEOF(char, 0) +AC_CHECK_SIZEOF(short, 0) +AC_CHECK_SIZEOF(int, 0) +AC_CHECK_SIZEOF(long, 0) +AC_CHECK_SIZEOF(long unsigned int, 0) +AC_CHECK_SIZEOF(size_t, 0) dnl AC_HEADER_TIME dnl Checks for library functions. diff --git a/webcit/ical_subst.c b/webcit/ical_subst.c index 4693786cb..5d6259d88 100644 --- a/webcit/ical_subst.c +++ b/webcit/ical_subst.c @@ -58,7 +58,7 @@ void SortPregetMatter(HashList *Cals) while ((SortMap[i] != NULL) && (Cal->SortBy != NULL)) { - Cal->SortBy = icalcomponent_get_first_property(Cal->SortBy, SortMap[i++]->map); + /****Cal->SortBy = icalcomponent_get_first_property(Cal->SortBy, SortMap[i++]->map); */ } } diff --git a/webcit/tcp_sockets.c b/webcit/tcp_sockets.c index ba4cac556..b73823a58 100644 --- a/webcit/tcp_sockets.c +++ b/webcit/tcp_sockets.c @@ -329,7 +329,7 @@ int serv_read_binary(StrBuf *Ret, size_t total_len, StrBuf *Buf) if (MaxRead == -1) { - serv_printf("READ %d|%d", 0, total_len); + serv_printf("READ %d|"SIZE_T_FMT, 0, total_len); if (StrBuf_ServGetln(Buf) > 0) { long YetRead; diff --git a/webcit/webcit.h b/webcit/webcit.h index 8fab48721..2f1e04873 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -114,6 +114,17 @@ extern char *ssl_cipher_list; #define DEFAULT_SSL_CIPHER_LIST "DEFAULT" /* See http://openssl.org/docs/apps/ciphers.html */ #endif +#if SIZEOF_SIZE_T == SIZEOF_INT +#define SIZE_T_FMT "%d" +#else +#define SIZE_T_FMT "%ld" +#endif + +#if SIZEOF_LONG_UNSIGNED_INT == SIZEOF_INT +#define ULONG_FMT "%d" +#else +#define ULONG_FMT "%ld" +#endif #define CALENDAR_ROOM_NAME "Calendar" #define PRODID "-//Citadel//NONSGML Citadel Calendar//EN"