Bug 54298 - bug in source code
Summary: bug in source code
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tree
Version: 6.2
Hardware: alpha
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-10-03 19:31 UTC by d.binderman
Modified: 2008-05-01 15:38 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2001-10-05 10:40:49 UTC


Attachments (Terms of Use)

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.



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