On 1/16/13 1:14 PM, Thomas D. Dean wrote:
On 01/16/13 03:00, Patrick Lamaiziere wrote:
Looks like gcc47 checks the printf format string (-Wformat)
Disable this check or convert your time_t.
Yes, I know gcc47 checks the format string.
But, time_t is of type int32, from a typedef statement.
On Sun, Jan 20, 2013 at 8:07 PM, Garance A Drosehn g...@freebsd.org wrote:
Yes, this means that the only reliable way to printf a time_t is
to use a cast. That has been true for at least a decade. It may
be true that you happened to avoid this issue before, but the only
*RELIABLE*
Polytropon free...@edvax.de writes:
On Wed, 16 Jan 2013 10:21:03 -0800, Michael Sierchio wrote:
Top posting for brevity - the fact is, the code in your original
example is wrong. There are reasons to complain about argument size
mismatches, esp. in print functions that call (versions of)
On Thu, 17 Jan 2013 09:24:27 -0500, Lowell Gilbert wrote:
Polytropon free...@edvax.de writes:
On Wed, 16 Jan 2013 10:21:03 -0800, Michael Sierchio wrote:
Top posting for brevity - the fact is, the code in your original
example is wrong. There are reasons to complain about argument size
On 01/17/13 06:24, Lowell Gilbert wrote:
A lot of discussion about what I can do other than understand why gcc
does not keep track of the basic typedef.
Mayhe the question is beyond this list.
Thanks for the replies.
Tom Dean
___
On Thu, 17 Jan 2013 20:46:25 -0800, Thomas D. Dean wrote:
A lot of discussion about what I can do other than understand why gcc
does not keep track of the basic typedef.
As explained, gcc issues a valid (!) warning because there
was a type mismatch: You tried to printf() a (long) value
with
Le Tue, 15 Jan 2013 10:35:53 -0800,
Thomas D. Dean tomd...@speakeasy.org a écrit :
Hello,
I am attempting to recompile some code from an older version.
uname -a
FreeBSD ZD7000 9.1-STABLE FreeBSD 9.1-STABLE #1: Sun Jan 13 23:44:33
PST 2013 root@ZD7000:/usr/obj/usr/src/sys/GENERIC
On 01/16/13 03:00, Patrick Lamaiziere wrote:
Looks like gcc47 checks the printf format string (-Wformat)
Disable this check or convert your time_t.
Yes, I know gcc47 checks the format string.
But, time_t is of type int32, from a typedef statement.
#include stdio.h
typedef int zzz;
typedef
Top posting for brevity - the fact is, the code in your original
example is wrong. There are reasons to complain about argument size
mismatches, esp. in print functions that call (versions of) malloc.
You should cast the time_t value explicitly, or use %d instead of %ld.
- M
On Wed, Jan 16,
Date: Wed, 16 Jan 2013 10:14:19 -0800
From: Thomas D. Dean tomd...@speakeasy.org
Subject: Re: time_t definition
On 01/16/13 03:00, Patrick Lamaiziere wrote:
Looks like gcc47 checks the printf format string (-Wformat)
Disable this check or convert your time_t.
Yes, I know gcc47 checks
On 01/16/13 10:41, Robert Bonomi wrote:
*precisely* and the format string had %ld.
this IS a type mismatch, if a 'long' is a 64-bit value.
The original code was compiled on a 32-bit machine for a 32-bit target.
I tried %d, %ld, and %lld with the same result.
FALSE. Calculation is OK.
On Wed, 16 Jan 2013 10:21:03 -0800, Michael Sierchio wrote:
Top posting for brevity - the fact is, the code in your original
example is wrong. There are reasons to complain about argument size
mismatches, esp. in print functions that call (versions of) malloc.
You should cast the time_t value
On Wed, 16 Jan 2013 13:32:14 -0800, Thomas D. Dean wrote:
On 01/16/13 10:41, Robert Bonomi wrote:
*precisely* and the format string had %ld.
this IS a type mismatch, if a 'long' is a 64-bit value.
The original code was compiled on a 32-bit machine for a 32-bit target.
I tried %d,
I am attempting to recompile some code from an older version.
uname -a
FreeBSD ZD7000 9.1-STABLE FreeBSD 9.1-STABLE #1: Sun Jan 13 23:44:33 PST
2013 root@ZD7000:/usr/obj/usr/src/sys/GENERIC i386
make
gcc47 -O2 -pipe -I../../include -std=gnu99 -fstack-protector
-Wsystem-headers
14 matches
Mail list logo