2009-06-10 Pavel Roskin <proski@gnu.org>
* kern/file.c (grub_file_read): Use void pointer for the buffer. Adjust all callers.
This commit is contained in:
parent
27d5fef717
commit
5c5215d5e2
22 changed files with 59 additions and 56 deletions
|
@ -98,7 +98,7 @@ tga_load_truecolor_rle_R8G8B8 (struct grub_video_bitmap *bitmap,
|
|||
|
||||
for (x = 0; x < header->image_width;)
|
||||
{
|
||||
if (grub_file_read (file, (char *)&type, sizeof (type)) != sizeof(type))
|
||||
if (grub_file_read (file, &type, sizeof (type)) != sizeof(type))
|
||||
return grub_errno;
|
||||
|
||||
if (type & 0x80)
|
||||
|
@ -107,7 +107,7 @@ tga_load_truecolor_rle_R8G8B8 (struct grub_video_bitmap *bitmap,
|
|||
type &= 0x7f;
|
||||
type++;
|
||||
|
||||
if (grub_file_read (file, (char *)&tmp[0], bytes_per_pixel)
|
||||
if (grub_file_read (file, &tmp[0], bytes_per_pixel)
|
||||
!= bytes_per_pixel)
|
||||
return grub_errno;
|
||||
|
||||
|
@ -132,7 +132,7 @@ tga_load_truecolor_rle_R8G8B8 (struct grub_video_bitmap *bitmap,
|
|||
|
||||
while (type)
|
||||
{
|
||||
if (grub_file_read (file, (char *)&tmp[0], bytes_per_pixel)
|
||||
if (grub_file_read (file, &tmp[0], bytes_per_pixel)
|
||||
!= bytes_per_pixel)
|
||||
return grub_errno;
|
||||
|
||||
|
@ -177,7 +177,7 @@ tga_load_truecolor_rle_R8G8B8A8 (struct grub_video_bitmap *bitmap,
|
|||
|
||||
for (x = 0; x < header->image_width;)
|
||||
{
|
||||
if (grub_file_read (file, (char *)&type, sizeof (type)) != sizeof(type))
|
||||
if (grub_file_read (file, &type, sizeof (type)) != sizeof(type))
|
||||
return grub_errno;
|
||||
|
||||
if (type & 0x80)
|
||||
|
@ -186,7 +186,7 @@ tga_load_truecolor_rle_R8G8B8A8 (struct grub_video_bitmap *bitmap,
|
|||
type &= 0x7f;
|
||||
type++;
|
||||
|
||||
if (grub_file_read (file, (char *)&tmp[0], bytes_per_pixel)
|
||||
if (grub_file_read (file, &tmp[0], bytes_per_pixel)
|
||||
!= bytes_per_pixel)
|
||||
return grub_errno;
|
||||
|
||||
|
@ -212,7 +212,7 @@ tga_load_truecolor_rle_R8G8B8A8 (struct grub_video_bitmap *bitmap,
|
|||
|
||||
while (type)
|
||||
{
|
||||
if (grub_file_read (file, (char *)&tmp[0], bytes_per_pixel)
|
||||
if (grub_file_read (file, &tmp[0], bytes_per_pixel)
|
||||
!= bytes_per_pixel)
|
||||
return grub_errno;
|
||||
|
||||
|
@ -257,7 +257,7 @@ tga_load_truecolor_R8G8B8 (struct grub_video_bitmap *bitmap,
|
|||
|
||||
for (x = 0; x < header->image_width; x++)
|
||||
{
|
||||
if (grub_file_read (file, (char *)&tmp[0], bytes_per_pixel)
|
||||
if (grub_file_read (file, &tmp[0], bytes_per_pixel)
|
||||
!= bytes_per_pixel)
|
||||
return grub_errno;
|
||||
|
||||
|
@ -294,7 +294,7 @@ tga_load_truecolor_R8G8B8A8 (struct grub_video_bitmap *bitmap,
|
|||
|
||||
for (x = 0; x < header->image_width; x++)
|
||||
{
|
||||
if (grub_file_read (file, (char *)&tmp[0], bytes_per_pixel)
|
||||
if (grub_file_read (file, &tmp[0], bytes_per_pixel)
|
||||
!= bytes_per_pixel)
|
||||
return grub_errno;
|
||||
|
||||
|
@ -327,7 +327,7 @@ grub_video_reader_tga (struct grub_video_bitmap **bitmap,
|
|||
not going to support developer area & extensions at this point. */
|
||||
|
||||
/* Read TGA header from beginning of file. */
|
||||
if (grub_file_read (file, (char*)&header, sizeof (header))
|
||||
if (grub_file_read (file, &header, sizeof (header))
|
||||
!= sizeof (header))
|
||||
{
|
||||
grub_file_close (file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue