* [committed]: Fix compile time warnings building vms-misc.c
@ 2010-05-28 12:24 Nick Clifton
2010-05-28 12:26 ` Nick Clifton
2010-05-28 14:57 ` Tristan Gingold
0 siblings, 2 replies; 3+ messages in thread
From: Nick Clifton @ 2010-05-28 12:24 UTC (permalink / raw)
To: binutils
Hi Guys,
I am checking in the patch below to remove a couple of compile time
warnings about useless shifts when compiling vms-misc.c on a host with
a 32-bit time_t type.
Cheers
Nick
bfd/ChangeLog
2010-05-28 Nick Clifton <nickc@redhat.com>
* vms-misc.c (vms_time_t_to_vms_time): Fix compile time warning
about seal's shifts.
Index: bfd/vms-misc.c
===================================================================
RCS file: /cvs/src/src/bfd/vms-misc.c,v
retrieving revision 1.35
diff -c -3 -p -r1.35 vms-misc.c
*** bfd/vms-misc.c 27 May 2010 13:43:44 -0000 1.35
--- bfd/vms-misc.c 28 May 2010 12:22:00 -0000
*************** vms_time_t_to_vms_time (time_t ut, unsig
*** 587,594 ****
val[1] = (ut >> 16) & 0xffff;
if (sizeof (ut) > 4)
{
! val[2] = (ut >> 32) & 0xffff;
! val[3] = (ut >> 48) & 0xffff;
}
else
{
--- 587,596 ----
val[1] = (ut >> 16) & 0xffff;
if (sizeof (ut) > 4)
{
! /* The shifts are expressed this way to avoid
! compile time warnings when sizeof (ut) <= 4. */
! val[2] = ((ut >> 16) >> 16) & 0xffff;
! val[3] = (((ut >> 16) >> 16) >> 16) & 0xffff;
}
else
{
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [committed]: Fix compile time warnings building vms-misc.c
2010-05-28 12:24 [committed]: Fix compile time warnings building vms-misc.c Nick Clifton
@ 2010-05-28 12:26 ` Nick Clifton
2010-05-28 14:57 ` Tristan Gingold
1 sibling, 0 replies; 3+ messages in thread
From: Nick Clifton @ 2010-05-28 12:26 UTC (permalink / raw)
To: binutils
Hi Guys,
> I am checking in the patch below to remove a couple of compile time
> warnings about useless shifts when compiling vms-misc.c on a host with
> a 32-bit time_t type.
Commit cancelled. Jan beat me to it. :-)
Cheers
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [committed]: Fix compile time warnings building vms-misc.c
2010-05-28 12:24 [committed]: Fix compile time warnings building vms-misc.c Nick Clifton
2010-05-28 12:26 ` Nick Clifton
@ 2010-05-28 14:57 ` Tristan Gingold
1 sibling, 0 replies; 3+ messages in thread
From: Tristan Gingold @ 2010-05-28 14:57 UTC (permalink / raw)
To: Nick Clifton; +Cc: binutils
On May 28, 2010, at 2:24 PM, Nick Clifton wrote:
> Hi Guys,
>
> I am checking in the patch below to remove a couple of compile time
> warnings about useless shifts when compiling vms-misc.c on a host with
> a 32-bit time_t type.
I am sorry about having writing code that created this warning. As you can see I tried to avoid the
warning, but as you can also see from Jan's patch I didn't use the right template.
Tristan.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-28 14:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-28 12:24 [committed]: Fix compile time warnings building vms-misc.c Nick Clifton
2010-05-28 12:26 ` Nick Clifton
2010-05-28 14:57 ` Tristan Gingold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).