summaryrefslogtreecommitdiff
path: root/bits.h
diff options
context:
space:
mode:
Diffstat (limited to 'bits.h')
-rw-r--r--bits.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/bits.h b/bits.h
index 8b79c56e..c8f88488 100644
--- a/bits.h
+++ b/bits.h
@@ -35,8 +35,8 @@
extern float getlef32(const char *, int);
extern double getled64(const char *, int);
-#define putle16(buf, off, w) do {putbyte(buf, (off)+1, (uint)(w) >> 8); putbyte(buf, (off), (w));} while (0)
-#define putle32(buf, off, l) do {putle16(buf, (off)+2, (uint)(l) >> 16); putle16(buf, (off), (l));} while (0)
+#define putle16(buf, off, w) do {putbyte(buf, (off)+1, (unsigned int)(w) >> 8); putbyte(buf, (off), (w));} while (0)
+#define putle32(buf, off, l) do {putle16(buf, (off)+2, (unsigned int)(l) >> 16); putle16(buf, (off), (l));} while (0)
/* big-endian access */
#define getbes16(buf, off) ((int16_t)(((uint16_t)getub(buf, (off)) << 8) | (uint16_t)getub(buf, (off)+1)))