INN commit: trunk/innfeed (tape.c)

INN Commit rra at isc.org
Tue Jun 14 19:13:52 UTC 2011


    Date: Tuesday, June 14, 2011 @ 12:13:51
  Author: iulius
Revision: 9209

Build INN with the new "-Wunused-but-set-variable" GCC 4.6.0 warning.

Remove unused variable "amt", and at the same time two useless
TRUST_FPRINTF and NO_TRUST_STRLEN branches.

Modified:
  trunk/innfeed/tape.c

--------+
 tape.c |   24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)

Modified: tape.c
===================================================================
--- tape.c	2011-06-14 19:12:18 UTC (rev 9208)
+++ tape.c	2011-06-14 19:13:51 UTC (rev 9209)
@@ -631,7 +631,6 @@
 #if 0
   QueueElem elem ;
 #endif
-  int amt ;
   const char *fname, *msgid ;
 
   ASSERT (tape != NULL) ;
@@ -646,25 +645,14 @@
 
   fname = artFileName (article) ;
   msgid = artMsgId (article) ;
-  amt = fprintf (tape->outFp,"%s %s\n", fname, msgid) ;
-
+  fprintf (tape->outFp,"%s %s\n", fname, msgid);
   /* I'd rather know where I am each time, and I don't trust all
-    fprintf's to give me character counts. */
-#if defined (TRUST_FPRINTF)
-
-  tape->outputSize += amt ;
-
-#else
-#if defined (NO_TRUST_STRLEN)
-
-  tape->outputSize = ftello (tape->outFp) ;
-
-#else
-
+   * fprintf's to give me character counts.  Therefore, do not use:
+   *   tape->outputSize += (return value of the previous fprintf call);
+   * nor:
+   *   tape->outputSize = ftello (tape->outFp);
+   */
   tape->outputSize += strlen(fname) + strlen(msgid) + 2 ; /* " " + "\n" */
-
-#endif
-#endif
   
   delArticle (article) ;
 




More information about the inn-committers mailing list