This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Support HWCAPs for MIPS


On 03/06/2015 10:52 AM, Andreas Schwab wrote:
> Mike Frysinger <vapier@gentoo.org> writes:
> 
>>> +{
>>> +  int i;
>>> +
>>> +  /* Fallback to unknown output mechanism.  */
>>> +  if (type == AT_HWCAP2)
>>> +    return -1;
>>> +
>>> +  _dl_printf ("AT_HWCAP:   ");
>>> +
>>> +  for (i = 0; i < _DL_HWCAP_COUNT; ++i)
>>> +    if (word & (1 << i))
>>
>> i is an int, but word is an unsigned long int.
> 
> That's not a problem.  The problem is that 1 is an int.

Right, you want 1U.

Which reminds me that elf.h is all wrong also and needs 1U everywhere.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]