From owner-freebsd-current Mon Sep 2 9:46:35 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23F3A37B400; Mon, 2 Sep 2002 09:46:34 -0700 (PDT) Received: from espresso.q9media.com (espresso.q9media.com [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3BE443E4A; Mon, 2 Sep 2002 09:46:33 -0700 (PDT) (envelope-from mike@espresso.q9media.com) Received: by espresso.q9media.com (Postfix, from userid 1002) id 2529F9E57; Mon, 2 Sep 2002 12:40:32 -0400 (EDT) Date: Mon, 2 Sep 2002 12:40:32 -0400 From: Mike Barcroft To: luigi@FreeBSD.org Cc: current@FreeBSD.org Subject: Fatal warnings breaks ipfw on LP64 Message-ID: <20020902124032.D94253@espresso.q9media.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: The FreeBSD Project Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG cc1: warnings being treated as errors /usr/src/sys/netinet/ip_fw2.c: In function `ipfw_ctl': /usr/src/sys/netinet/ip_fw2.c:2508: warning: cast from pointer to integer of different size /usr/src/sys/netinet/ip_fw2.c:2521: warning: cast from pointer to integer of different size Some of the code in question looks questionable: /* * abuse 'next_rule' to store the set_disable word */ (u_int32_t)(((struct ip_fw *)bp)->next_rule) = set_disable; The rvalue is being cast in an assignment to make a pointer store an integer? Surely this can be written better. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message