projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c783aaf
)
ao_hmc5883: Add explicit casts for -Wconversion
author
Keith Packard
<keithp@keithp.com>
Fri, 28 Jan 2022 17:29:06 +0000
(09:29 -0800)
committer
Keith Packard
<keithp@keithp.com>
Thu, 17 Feb 2022 01:26:49 +0000
(17:26 -0800)
No bugs noted.
Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_hmc5883.c
patch
|
blob
|
history
diff --git
a/src/drivers/ao_hmc5883.c
b/src/drivers/ao_hmc5883.c
index 55a193ac5adb58236acb51be0e3a3f9eb78fe5e5..fc339334c51889181cae88d37f80bf33a20ef3f6 100644
(file)
--- a/
src/drivers/ao_hmc5883.c
+++ b/
src/drivers/ao_hmc5883.c
@@
-87,7
+87,7
@@
ao_hmc5883_sample(struct ao_hmc5883_sample *sample)
/* byte swap */
while (i--) {
uint16_t t = *d;
/* byte swap */
while (i--) {
uint16_t t = *d;
- *d++ = (
t >> 8) | (t << 8
);
+ *d++ = (
uint16_t) ((t >> 8) | (t << 8)
);
}
#endif
}
}
#endif
}