Re: [PATCH] Pointer cast warnings in scripts/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 22, 2005 at 01:12:06PM +0200, Pierre Ossman wrote:
> That doesn't really make it a standard though (de facto perhaps). :)
> The odds of all those man pages deviating from the standard is probably
> very low. But unless someone has actually read the damn thing we won't
> know for sure.

You could check the C99 spec of course, which says gives (eg) strcmp as:

               int strcmp(const char *s1, const char *s2);

rmk's rules of char:

1. use char for character strings and individual characters
2. use signed char if your data type relies upon negative char values
3. use unsigned char if your data type does not require negative char
   values, especially if it makes use of the positive values not
   present in the signed char range.

IOW, use signed/unsigned when you need to explicitly state your
requirements, but omit it for true strings and characters.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux