From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18811 invoked by alias); 18 Jul 2011 15:37:22 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29556 Received: (qmail 5282 invoked from network); 18 Jul 2011 15:37:17 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Mon, 18 Jul 2011 15:50:30 +0100 From: Peter Stephenson To: Subject: Re: 4.3.12-dev-1 compile warning on MacOS Message-ID: <20110718155030.0e70cb49@pwslap01u.europe.root.pri> In-Reply-To: <110718073431.ZM13617@torch.brasslantern.com> References: <110718073431.ZM13617@torch.brasslantern.com> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.103.11.26] X-Scanned-By: MailControl A-12-00-01 (www.mailcontrol.com) on 10.71.0.140 On Mon, 18 Jul 2011 07:34:31 -0700 Bart Schaefer wrote: > rlimits.c: In function 'showlimitvalue': > rlimits.c:105: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'rlim_t' > rlimits.c:126: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'rlim_t' > rlimits.c:142: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'rlim_t' > rlimits.c:161: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'long long unsigned int' > rlimits.c:163: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'long long unsigned int' > rlimits.c: In function 'printulimit': > rlimits.c:401: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'rlim_t' Sounds like RLIMT_T_IS_LONG_LONG should be defined but isn't. This is the test the shell is running to check the size: #ifdef HAVE_SYS_TIME_H #include #endif #include main(){struct rlimit r;exit(sizeof(r.rlim_cur) <= sizeof(long));} Is rlim_cur not rlim_t, for some reason? Or are the some flags missing when this is compiled? However, even that's not good enough since code doesn't currently handle the combination of unsigned and long long. That should be easier to fix. -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog