diff mbox

[3/7] Typecasting problem in vbetoo.c

Message ID 1373118556-27472-4-git-send-email-kix@kix.es (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Rodolfo García Peñas (kix) July 6, 2013, 1:49 p.m. UTC
From: "Rodolfo García Peñas (kix)" <kix@kix.es>

This patch changes the typecasting for r.es and r.ebx, from "unsigned int" to
"unsigned long". The new code doesn't show compiler warnings.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
---
 vbetool/vbetool.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/vbetool/vbetool.c b/vbetool/vbetool.c
index 55e019f..45fafdb 100644
--- a/vbetool/vbetool.c
+++ b/vbetool/vbetool.c
@@ -243,8 +243,8 @@  void restore_state_from(char *data)
 	r.eax = 0x4f04;
 	r.ecx = 0xf;		/* all states */
 	r.edx = 2;		/* restore state */
-	r.es = (unsigned int) (data - LRMI_base_addr()) >> 4;
-	r.ebx = (unsigned int) (data - LRMI_base_addr()) & 0xf;
+	r.es = (unsigned long) (data - LRMI_base_addr()) >> 4;
+	r.ebx = (unsigned long) (data - LRMI_base_addr()) & 0xf;
 	r.ds = 0x0040;
 
 	if (!LRMI_int(0x10, &r)) {
@@ -327,8 +327,8 @@  char *__save_state(int *psize)
 	r.ecx = 0xf;		/* all states */
 	r.edx = 1;		/* save state */
 	
-	r.es = (unsigned int) (buffer - LRMI_base_addr()) >> 4;
-	r.ebx = (unsigned int) (buffer - LRMI_base_addr()) & 0xf;
+	r.es = (unsigned long) (buffer - LRMI_base_addr()) >> 4;
+	r.ebx = (unsigned long) (buffer - LRMI_base_addr()) & 0xf;
 	r.ds = 0x0040;
 
 	fprintf(stderr, "ES: 0x%04X EBX: 0x%04X\n", r.es, r.ebx);