From 6cbffa71efd43d827ac978067c78dc370be09fef Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Tue, 5 Aug 2008 18:43:24 +0000 Subject: [PATCH] remove hardcoded retry stuff; put -Werror back in (who the fk removed that?) git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1234 7f574dfc-610e-0410-a909-a81674777703 --- configure.ac.in | 4 ++-- src/conky.c | 12 ++++++------ src/conky.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 490b7a16..cd69715b 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -644,10 +644,10 @@ AC_ARG_ENABLE([testing], if test "x$want_testing" = "xyes" -a $ac_cv_c_compiler_gnu != no; then if test "x$want_debug" = "xyes"; then - CFLAGS="$CFLAGS -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -std=c99 -pedantic" + CFLAGS="$CFLAGS -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -std=c99 -pedantic -Werror" AC_DEFINE([TESTING], [], [Define for testing (enables strict compiler flags)]) else - CFLAGS="$CFLAGS -g3 -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -std=c99 -pedantic" + CFLAGS="$CFLAGS -g3 -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -std=c99 -pedantic -Werror" AC_DEFINE([TESTING], [], [Define for testing (enables strict compiler flags)]) fi fi diff --git a/src/conky.c b/src/conky.c index e830b684..8d9bde2d 100644 --- a/src/conky.c +++ b/src/conky.c @@ -1634,7 +1634,7 @@ void *imap_thread(void *arg) char recvbuf[MAXDATASIZE]; char sendbuf[MAXDATASIZE]; char *reply; - int fail = 0; + unsigned int fail = 0; unsigned int old_unseen = UINT_MAX; unsigned int old_messages = UINT_MAX; struct stat stat_buf; @@ -1661,8 +1661,8 @@ void *imap_thread(void *arg) fd_set fdset; if (fail > 0) { - ERR("Trying IMAP connection again for %s@%s (try %i/5)", - mail->user, mail->host, fail + 1); + ERR("Trying IMAP connection again for %s@%s (try %u/%u)", + mail->user, mail->host, fail + 1, mail->retries); } do { if ((sockfd = socket(PF_INET, SOCK_STREAM, 0)) == -1) { @@ -1831,7 +1831,7 @@ void *pop3_thread(void *arg) char recvbuf[MAXDATASIZE]; char sendbuf[MAXDATASIZE]; char *reply; - int fail = 0; + unsigned int fail = 0; unsigned int old_unseen = UINT_MAX; struct stat stat_buf; struct hostent he, *he_res = 0; @@ -1857,8 +1857,8 @@ void *pop3_thread(void *arg) fd_set fdset; if (fail > 0) { - ERR("Trying POP3 connection again for %s@%s (try %i/5)", - mail->user, mail->host, fail + 1); + ERR("Trying POP3 connection again for %s@%s (try %u/%u)", + mail->user, mail->host, fail + 1, mail->retries); } do { if ((sockfd = socket(PF_INET, SOCK_STREAM, 0)) == -1) { diff --git a/src/conky.h b/src/conky.h index 29410f4a..decb42a7 100644 --- a/src/conky.h +++ b/src/conky.h @@ -156,7 +156,7 @@ struct mail_s { // for imap and pop3 unsigned long used; unsigned long quota; unsigned long port; - unsigned long retries; + unsigned int retries; float interval; double last_update; char host[128];