Bug 349851 - %lld format used for long type in ls.c
%lld format used for long type in ls.c
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: e2tools (Show other bugs)
rawhide
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Hans Ulrich Niedermann
Fedora Extras Quality Assurance
:
: 416701 (view as bug list)
Depends On:
Blocks: fedora-ia64
  Show dependency treegraph
 
Reported: 2007-10-23 21:59 EDT by Doug Chapman
Modified: 2007-12-17 06:17 EST (History)
1 user (show)

See Also:
Fixed In Version: 0.0.16-9.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-15 12:44:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Doug Chapman 2007-10-23 21:59:14 EDT
Description of problem:
The spec file has e2tools compiled with warnings treated as errors.  On ia64
(and likely other full 64 bit systems) this causes e2tools to fail to build at
ls.c line 660:

    660     printf("%7lld", info->inode.i_size |
    661            ((__u64)info->inode.i_size_high << 32));


There is probably a much better and more generic way to deal with this but we
need something like this:

#ifdef __ia64__
    printf("%7ld", info->inode.i_size |
           ((__u64)info->inode.i_size_high << 32));
#else
    printf("%7lld", info->inode.i_size |
           ((__u64)info->inode.i_size_high << 32));
#endif


Version-Release number of selected component (if applicable):
e2tools-0.0.16-5.fc7.src.rpm

How reproducible:
100%

Steps to Reproduce:
1. build on ia64
2.
3.
  
Actual results:
cc1: warnings being treated as errors
ls.c: In function 'long_disp':
ls.c:661: warning: format '%7lld' expects type 'long long int', but argument 2
has type 'long unsigned int'
make: *** [ls.o] Error 1


Expected results:


Additional info:
Comment 1 Hans Ulrich Niedermann 2007-12-08 16:28:21 EST
*** Bug 416701 has been marked as a duplicate of this bug. ***
Comment 2 Hans Ulrich Niedermann 2007-12-08 17:31:53 EST
I hope 0.0.16-8 will fix this issue on both ia64 and alpha.

It does fix in on ppc64 which failed before with the very same warning.
Comment 3 Hans Ulrich Niedermann 2007-12-08 21:54:33 EST
0.0.16-8 is broken on x86_64, as it seems that

  __u64_t is a long unsigned int (64bit)
  uint64_t is a long long unsigned int (64bit)
  PRIu64 is "llu"
  printf("%" PRIu64, (__u64)1) thusly produces a warning

Casting the expression to (uint64_t) should fix the thing on all platforms, once
and for all (cf. 0.0.16-9).
Comment 4 Oliver Falk 2007-12-09 16:45:02 EST
Typical WorksForMe(tm) (now) bug. :-)
Comment 5 Fedora Update System 2007-12-10 15:42:32 EST
e2tools-0.0.16-9.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update e2tools'
Comment 6 Fedora Update System 2007-12-10 15:44:01 EST
e2tools-0.0.16-9.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update e2tools'
Comment 7 Fedora Update System 2007-12-15 12:44:22 EST
e2tools-0.0.16-9.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2007-12-15 12:50:55 EST
e2tools-0.0.16-9.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Oliver Falk 2007-12-16 16:40:11 EST
worksforme(tm)
Comment 10 Hans Ulrich Niedermann 2007-12-17 06:17:45 EST
(In reply to comment #3)
> 0.0.16-8 is broken on x86_64, as it seems that
> 
>   __u64_t is a long unsigned int (64bit)
>   uint64_t is a long long unsigned int (64bit)

I'm just being told that is not quite accurate, so I am going to correct this
for the sake off accuracy.

x86_64 defines

   __u64    as "unsigned long long"
   uint64_t as "unsigned long long int"

>   PRIu64 is "llu"
>   printf("%" PRIu64, (__u64)1) thusly produces a warning

This, however, still applies.

Note You need to log in before you can comment on or make changes to this bug.