On Fri, 12 Nov 2010 22:03:02 +0000 (UTC) George V. Neville-Neil wrote:

 GVN> Author: gnn
 GVN> Date: Fri Nov 12 22:03:02 2010
 GVN> New Revision: 215207
 GVN> URL: http://svn.freebsd.org/changeset/base/215207


 GVN> Modified: head/sys/net/if_llatbl.c
 GVN> 
==============================================================================
 GVN> --- head/sys/net/if_llatbl.c        Fri Nov 12 21:47:36 2010        
(r215206)
 GVN> +++ head/sys/net/if_llatbl.c        Fri Nov 12 22:03:02 2010        
(r215207)
 GVN> @@ -100,18 +100,34 @@ done:
 GVN>   * This function is called by the timer functions
 GVN>   * such as arptimer() and nd6_llinfo_timer(), and
 GVN>   * the caller does the locking.
 GVN> + *
 GVN> + * Returns the number of held packets, if any, that were dropped.
 GVN>   */
 GVN> -void
 GVN> +size_t
 GVN>  llentry_free(struct llentry *lle)
 GVN>  {
 GVN> -        
 GVN> +        size_t pkts_dropped;
 GVN> +        struct mbuf *next;
 GVN> +
 GVN> +        pkts_dropped = 0;
 GVN>          LLE_WLOCK_ASSERT(lle);
 GVN>          LIST_REMOVE(lle, lle_next);
 GVN>  
 GVN> -        if (lle->la_hold != NULL)
 GVN> +        while ((lle->la_numheld > 0) && (lle->la_hold != NULL)) {
 GVN> +                next = lle->la_hold->m_nextpkt;
 GVN>                  m_freem(lle->la_hold);
 GVN> +                lle->la_hold = next;
 GVN> +                lle->la_numheld--;
 GVN> +                pkts_dropped++;
 GVN> +        }
 GVN> +
 GVN> +        KASSERT(lle->la_numheld == 0, 
 GVN> +                ("%s: la_numheld %d > 0, pkts_droped %ld", __func__, 
 GVN> +                 lle->la_numheld, pkts_dropped));

cc -c -O -pipe  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs 
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  
-Wundef -Wno-pointer-sign -fformat-extensions -nostdinc  -I. -I/usr/src/sys 
-I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include 
opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 
--param large-function-growth=1000  -mno-align-long-strings 
-mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 
-ffreestanding -fstack-protector -Werror  /usr/src/sys/net/if_llatbl.c
cc1: warnings being treated as errors
/usr/src/sys/net/if_llatbl.c: In function 'llentry_free':
/usr/src/sys/net/if_llatbl.c:124: warning: format '%ld' expects type 'long 
int', but argument 4 has type 'size_t'
*** Error code 1

I think this should be:

Index: sys/net/if_llatbl.c
===================================================================
--- sys/net/if_llatbl.c (revision 215233)
+++ sys/net/if_llatbl.c (working copy)
@@ -122,7 +122,7 @@ llentry_free(struct llentry *lle)
        }
 
        KASSERT(lle->la_numheld == 0, 
-               ("%s: la_numheld %d > 0, pkts_droped %ld", __func__, 
+               ("%s: la_numheld %d > 0, pkts_droped %zu", __func__, 
                 lle->la_numheld, pkts_dropped));
 
        LLE_FREE_LOCKED(lle);

-- 
Mikolaj Golub
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to