From owner-svn-src-head@freebsd.org Tue Jan 26 23:36:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B40A3A6F8EC; Tue, 26 Jan 2016 23:36:19 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78A951DE9; Tue, 26 Jan 2016 23:36:19 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0QNaIEc011858; Tue, 26 Jan 2016 23:36:18 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0QNaI8I011857; Tue, 26 Jan 2016 23:36:18 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201601262336.u0QNaI8I011857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Tue, 26 Jan 2016 23:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294858 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2016 23:36:19 -0000 Author: luigi Date: Tue Jan 26 23:36:18 2016 New Revision: 294858 URL: https://svnweb.freebsd.org/changeset/base/294858 Log: fix various warnings (signed/unsigned, printf types, unused arguments) Modified: head/sys/netpfil/ipfw/dn_sched_qfq.c Modified: head/sys/netpfil/ipfw/dn_sched_qfq.c ============================================================================== --- head/sys/netpfil/ipfw/dn_sched_qfq.c Tue Jan 26 22:46:58 2016 (r294857) +++ head/sys/netpfil/ipfw/dn_sched_qfq.c Tue Jan 26 23:36:18 2016 (r294858) @@ -48,6 +48,7 @@ #endif #ifdef QFQ_DEBUG +#define _P64 unsigned long long /* cast for printing uint64_t */ struct qfq_sched; static void dump_sched(struct qfq_sched *q, const char *msg); #define NO(x) x @@ -84,19 +85,19 @@ static inline unsigned long __fls(unsign #if !defined(_KERNEL) || !defined(__linux__) #ifdef QFQ_DEBUG -int test_bit(int ix, bitmap *p) +static int test_bit(int ix, bitmap *p) { if (ix < 0 || ix > 31) D("bad index %d", ix); return *p & (1< 31) D("bad index %d", ix); *p |= (1< 31) D("bad index %d", ix); @@ -230,9 +231,9 @@ struct qfq_sched { uint64_t V; /* Precise virtual time. */ uint32_t wsum; /* weight sum */ uint32_t iwsum; /* inverse weight sum */ - NO(uint32_t i_wsum; /* ONE_FP/w_sum */ - uint32_t _queued; /* debugging */ - uint32_t loops; /* debugging */) + NO(uint32_t i_wsum;) /* ONE_FP/w_sum */ + NO(uint32_t queued;) /* debugging */ + NO(uint32_t loops;) /* debugging */ bitmap bitmaps[QFQ_MAX_STATE]; /* Group bitmaps. */ struct qfq_group groups[QFQ_MAX_INDEX + 1]; /* The groups. */ }; @@ -486,6 +487,7 @@ qfq_slot_rotate(struct qfq_sched *q, str { unsigned int i = (grp->S - roundedS) >> grp->slot_shift; + (void)q; grp->full_slots <<= i; grp->front = (grp->front - i) % QFQ_MAX_SLOTS; } @@ -516,6 +518,7 @@ qfq_update_class(struct qfq_sched *q, st struct qfq_class *cl) { + (void)q; cl->S = cl->F; if (cl->_q.mq.head == NULL) { qfq_front_slot_remove(grp); @@ -853,9 +856,9 @@ dump_groups(struct qfq_sched *q, uint32_ if (g->slots[j]) D(" bucket %d %p", j, g->slots[j]); } - D("full_slots 0x%x", g->full_slots); + D("full_slots 0x%llx", (_P64)g->full_slots); D(" %2d S 0x%20llx F 0x%llx %c", i, - g->S, g->F, + (_P64)g->S, (_P64)g->F, mask & (1<loops, q->queued, q->V); - D(" ER 0x%08x", q->bitmaps[ER]); - D(" EB 0x%08x", q->bitmaps[EB]); - D(" IR 0x%08x", q->bitmaps[IR]); - D(" IB 0x%08x", q->bitmaps[IB]); + D("loops %d queued %d V 0x%llx", q->loops, q->queued, (_P64)q->V); + D(" ER 0x%08x", (unsigned)q->bitmaps[ER]); + D(" EB 0x%08x", (unsigned)q->bitmaps[EB]); + D(" IR 0x%08x", (unsigned)q->bitmaps[IR]); + D(" IB 0x%08x", (unsigned)q->bitmaps[IB]); dump_groups(q, 0xffffffff); }; #endif /* QFQ_DEBUG */