[2212] 2009-05-13 Pavel Roskin <[email protected]>

Pavel Roskin <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2212
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2212
Author:   proski
Date:     2009-05-14 03:48:08 +0000 (Thu, 14 May 2009)
Log Message:
-----------
2009-05-13  Pavel Roskin  <[email protected]>

	* loader/i386/linux.c (allocate_pages): When assigning
	real_mode_mem, cast through grub_size_t to fix a warning.  The
	code already makes sure that the value would fit a pointer.
	(grub_linux_setup_video): Cast render_target->data to
	grub_size_t to fix a warning.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/loader/i386/linux.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-05-14 01:23:49 UTC (rev 2211)
+++ trunk/grub2/ChangeLog	2009-05-14 03:48:08 UTC (rev 2212)
@@ -1,3 +1,11 @@
+2009-05-13  Pavel Roskin  <[email protected]>
+
+	* loader/i386/linux.c (allocate_pages): When assigning
+	real_mode_mem, cast through grub_size_t to fix a warning.  The
+	code already makes sure that the value would fit a pointer.
+	(grub_linux_setup_video): Cast render_target->data to
+	grub_size_t to fix a warning.
+
 2009-05-13  Javier Martín <[email protected]>
 
 	* commands/i386/pc/drivemap.c: New file - implement drivemap

Modified: trunk/grub2/loader/i386/linux.c
===================================================================
--- trunk/grub2/loader/i386/linux.c	2009-05-14 01:23:49 UTC (rev 2211)
+++ trunk/grub2/loader/i386/linux.c	2009-05-14 03:48:08 UTC (rev 2212)
@@ -347,7 +347,8 @@
 	  if (real_size + mmap_size > size)
 	    return 0;
 
-	  real_mode_mem = (void *) ((addr + size) - (real_size + mmap_size));
+	  real_mode_mem =
+	    (void *) (grub_size_t) ((addr + size) - (real_size + mmap_size));
 	  return 1;
 	}
 
@@ -416,7 +417,7 @@
   params->lfb_depth = mode_info.bpp;
   params->lfb_line_len = mode_info.pitch;
 
-  params->lfb_base = (void *) render_target->data;
+  params->lfb_base = (grub_size_t) render_target->data;
   params->lfb_size = (params->lfb_line_len * params->lfb_height + 65535) >> 16;
 
   params->red_mask_size = mode_info.red_mask_size;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.