From: Sunil S. <sh...@bo...> - 2010-02-04 12:27:36
|
Hi Matthias, This is a patch to fix a call to gen_transact() in cram.c. Please check if my patch (i.e. my understanding of the code) is correct. The rest of the patch is to suppress compiler warnings in tls.c and to enable compiler warnings on incorrect invocation of SockPrintf(). ============================================================================ Index: fetchmail-6.3/cram.c =================================================================== --- fetchmail-6.3/cram.c (revision 5469) +++ fetchmail-6.3/cram.c (working copy) @@ -127,7 +127,7 @@ /* ship the authentication back, accept the server's responses */ /* PMDF5.2 IMAP has a bug that requires this to be a single write */ suppress_tags = TRUE; - result = gen_transact(sock, buf1, sizeof(buf1)); + result = gen_transact(sock, "%s", buf1); suppress_tags = FALSE; if (result) return(result); Index: fetchmail-6.3/tls.c =================================================================== --- fetchmail-6.3/tls.c (revision 5469) +++ fetchmail-6.3/tls.c (working copy) @@ -16,6 +16,7 @@ return (!ctl->sslproto || !strcasecmp(ctl->sslproto,"tls1")) && !ctl->use_ssl; #else + (void)ctl; return 0; #endif } @@ -28,6 +29,7 @@ && (ctl->sslfingerprint || ctl->sslcertck || (ctl->sslproto && !strcasecmp(ctl->sslproto, "tls1"))); #else + (void)ctl; return 0; #endif } Index: fetchmail-6.3/socket.h =================================================================== --- fetchmail-6.3/socket.h (revision 5469) +++ fetchmail-6.3/socket.h (working copy) @@ -51,7 +51,9 @@ Returns number of bytes successfully written. */ #if defined(HAVE_STDARG_H) -int SockPrintf(int sock, const char *format, ...) ; +int SockPrintf(int sock, const char *format, ...) + __attribute__ ((format (printf, 2, 3))) + ; #else int SockPrintf(); #endif ============================================================================ -- Sunil Shetye. |