Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos] / src / drivers / ao_hmc5883.c
index 55a193ac5adb58236acb51be0e3a3f9eb78fe5e5..fc339334c51889181cae88d37f80bf33a20ef3f6 100644 (file)
@@ -87,7 +87,7 @@ ao_hmc5883_sample(struct ao_hmc5883_sample *sample)
        /* byte swap */
        while (i--) {
                uint16_t        t = *d;
-               *d++ = (t >> 8) | (t << 8);
+               *d++ = (uint16_t) ((t >> 8) | (t << 8));
        }
 #endif
 }