Bug 54298

Summary: bug in source code
Product: [Retired] Red Hat Linux Reporter: d.binderman
Component: treeAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: alpha   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-10-05 10:40:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description d.binderman 2001-10-03 19:31:47 UTC
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 08:50:00 UTC
Fixed in tree-1.2-14.