Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Mar 2002 22:33:33 -0800 (PST)
From:      Bruce Evans <bde@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/dev/ata ata-raid.c
Message-ID:  <200203060633.g266XXE73257@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
bde         2002/03/05 22:33:33 PST

  Modified files:
    sys/dev/ata          ata-raid.c 
  Log:
  Fixed a printf format error again.  Rev.127 was clobbered in rev.1.128
  by removing parentheses.  The main bug is in gcc: on machines with
  64-bit longs and 64-bit long longs,
  
      (unsigned long long)rdp->total_sectors / ((1024L * 1024L) / DEV_BSIZE))
  
  has type plain unsigned long instead of the correctly promoted type
  unsigned long long, so it can not be printfed using %llu format.  Even
  1ULL / 1L is mispromoted.  Anyway, casting the correct operand
  automatically avoids the problem.  We do not want to to pessimize the
  division; we just want to convert to a common maximal type for printing.
  
  Revision  Changes    Path
  1.31      +1 -1      src/sys/dev/ata/ata-raid.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203060633.g266XXE73257>