Bug 54298 - bug in source code
bug in source code
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: tree (Show other bugs)
6.2
alpha Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-10-03 15:31 EDT by d.binderman
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-10-05 06:40:49 EDT
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 d.binderman 2001-10-03 15:31:47 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk  (Win98; I)

Description of problem:
I tried to compile tree-1.2-7, and got the following
compiler message

cc: Warning: tree.c, line 248: In this statement, this argument to printf is of "an unsigned long" type and is not appropriate for the 
conversion specifier "%9d".  The value might be truncated or formatted in an unintended manner. (outtypelen)
    if (sflag) printf("%9d",(*dir)->size);
----------------------------^

My patch for this problem was the following

*** tree.c.old	Wed Oct  3 16:18:22 2001
--- tree.c	Wed Oct  3 16:19:59 2001
***************
*** 245,251 ****
      if (uflag && (gflag || sflag || Dflag)) printf(" ");
      if (gflag) printf("%-8.8s",gidtoname((*dir)->gid));
      if (gflag && (sflag || Dflag)) printf(" ");
!     if (sflag) printf("%9d",(*dir)->size);
      if (sflag && Dflag) printf(" ");
      if (Dflag) printf("%s",do_date((*dir)->mtime));
      if (pflag || sflag || uflag || gflag || Dflag) printf("]  ");
--- 245,251 ----
      if (uflag && (gflag || sflag || Dflag)) printf(" ");
      if (gflag) printf("%-8.8s",gidtoname((*dir)->gid));
      if (gflag && (sflag || Dflag)) printf(" ");
!     if (sflag) printf("%9lu",(*dir)->size);
      if (sflag && Dflag) printf(" ");
      if (Dflag) printf("%s",do_date((*dir)->mtime));
      if (pflag || sflag || uflag || gflag || Dflag) printf("]  ");



Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.
2.
3.
	

Additional info:
Comment 1 Tim Waugh 2001-10-22 04:50:00 EDT
Fixed in tree-1.2-14.

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