[PATCH 1/2] Fix warnings generated when compiling with DEBUG=1

Przemyslaw Iskra sparky at pld-linux.org
Wed Sep 17 00:03:02 EST 2008


On Mon, Sep 15, 2008 at 05:23:16PM -0700, Chandra Seetharaman wrote:

> --- yaboot.git_head.orig/second/partition.c
> +++ yaboot.git_head/second/partition.c
> @@ -61,7 +61,7 @@ static const char *valid_mac_partition_t
>  
>  
>  #define MAX_BLOCK_SIZE	2048
> -static unsigned char block_buffer[MAX_BLOCK_SIZE];
> +static char block_buffer[MAX_BLOCK_SIZE];
> 

I don't think that's a good change. block_buffer contains binary data
and may contain values outside 0-127 scope, that's why it should be
explicitly marked as signed or unsigned. I guess unsigned is better in
this case.

-- 
 ____  Sparky{PI] -- Przemyslaw _  ___  _  _  ........... LANG...Pl..Ca..Es..En
/____) ___  ___  _ _ || Iskra  |  | _ \| |  | : WWW........ppcrcd.pld-linux.org
\____\| -_)'___| ||^'||//\\// <   |  _/| |  | : JID......sparky<at>jabberes.org
(____/||   (_-_|_||  ||\\ ||   |_ |_|  |_| _| : Mail....sparky<at>pld-linux.org



More information about the Yaboot-devel mailing list