4c2e2488a8
* fix the integer promotion fix
22 lines
916 B
Plaintext
22 lines
916 B
Plaintext
$OpenBSD: patch-image_h,v 1.2 2012/04/13 10:56:41 naddy Exp $
|
|
--- image.h.orig Fri Apr 13 12:46:25 2012
|
|
+++ image.h Fri Apr 13 12:47:21 2012
|
|
@@ -163,7 +163,7 @@ typedef struct {
|
|
((LEN) == 2 ? ((unsigned long) \
|
|
(*(byte *)(PTR) << 8) | \
|
|
(*((byte *)(PTR) + 1))) : \
|
|
- ((unsigned long)((*(byte *)(PTR) << 24) | \
|
|
+ ((unsigned long)(unsigned int)((*(byte *)(PTR) << 24) | \
|
|
(*((byte *)(PTR) + 1) << 16) | \
|
|
(*((byte *)(PTR) + 2) << 8) | \
|
|
(*((byte *)(PTR) + 3)))))))
|
|
@@ -176,7 +176,7 @@ typedef struct {
|
|
(*((byte *)(PTR) + 2) << 16)) : \
|
|
((LEN) == 2 ? ((unsigned long) \
|
|
(*(byte *)(PTR)) | (*((byte *)(PTR) + 1) << 8)) : \
|
|
- ((unsigned long)((*(byte *)(PTR)) | \
|
|
+ ((unsigned long)(unsigned int)((*(byte *)(PTR)) | \
|
|
(*((byte *)(PTR) + 1) << 8) | \
|
|
(*((byte *)(PTR) + 2) << 16) | \
|
|
(*((byte *)(PTR) + 3) << 24))))))
|