aboutsummaryrefslogtreecommitdiff
path: root/src/modules/uORB/topics/telemetry_status.h
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-07-08 07:32:36 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-07-08 07:32:36 +0200
commit512584ed750d58e2f87c509ebe7f4cf36984ac3d (patch)
tree232e9b26a3014f777f0926ceeb76f0954a66f208 /src/modules/uORB/topics/telemetry_status.h
parent103b129f0d48bf84b6161a4b55cb8dd649b8c903 (diff)
parent680ebf29c3f8298e63d4c4d9c9076464e6f4b3c1 (diff)
downloadpx4-firmware-512584ed750d58e2f87c509ebe7f4cf36984ac3d.tar.gz
px4-firmware-512584ed750d58e2f87c509ebe7f4cf36984ac3d.tar.bz2
px4-firmware-512584ed750d58e2f87c509ebe7f4cf36984ac3d.zip
Merge pull request #1145 from DonLakeFlyer/MoreWarnings
Fix compiler warnings
Diffstat (limited to 'src/modules/uORB/topics/telemetry_status.h')
-rw-r--r--src/modules/uORB/topics/telemetry_status.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/uORB/topics/telemetry_status.h b/src/modules/uORB/topics/telemetry_status.h
index c4b99d520..3347724a5 100644
--- a/src/modules/uORB/topics/telemetry_status.h
+++ b/src/modules/uORB/topics/telemetry_status.h
@@ -86,4 +86,14 @@ static const struct orb_metadata *telemetry_status_orb_id[TELEMETRY_STATUS_ORB_I
ORB_ID(telemetry_status_3),
};
+// This is a hack to quiet an unused-variable warning for when telemetry_status.h is
+// included but telemetry_status_orb_id is not referenced. The inline works if you
+// choose to use it, but you can continue to just directly index into the array as well.
+// If you don't use the inline this ends up being a no-op with no additional code emitted.
+extern inline const struct orb_metadata *telemetry_status_orb_id_lookup(size_t index);
+extern inline const struct orb_metadata *telemetry_status_orb_id_lookup(size_t index)
+{
+ return telemetry_status_orb_id[index];
+}
+
#endif /* TOPIC_TELEMETRY_STATUS_H */