Mailinglist Archive: opensuse-bugs (8045 mails)

< Previous Next >
[Bug 231196] New: htdig-3.2.0b6-45: left shift count >= width of type
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Sun, 31 Dec 2006 06:32:20 -0700 (MST)
  • Message-id: <bug-231196-21960@xxxxxxxxxxxxxxxxxxxxxxxxx/>
https://bugzilla.novell.com/show_bug.cgi?id=231196

Summary: htdig-3.2.0b6-45: left shift count >= width of type
Product: openSUSE 10.3
Version: unspecified
Platform: All
OS/Version: SuSE Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Basesystem
AssignedTo: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
ReportedBy: dcb314@xxxxxxxxxxx
QAContact: qa@xxxxxxx


I just tried to compile package htdig-3.2.0b6-45

The compiler said

Display.cc:1229: warning: left shift count >= width of type

The source code is

time_t eternity = ~(1<<(sizeof(time_t)*8-1)); // will be the largest value
holdable by a time_t

I agree with the compiler.

Suggest new code

time_t eternity = ~(1UL << (sizeof(time_t)*8-1)); // will be the largest
value holdable by a time_t


--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

< Previous Next >
This Thread
  • No further messages