Skip to content

Commit 08f8b58

Browse files
committed
CloudTelevision: suppress aliasing warning
1 parent 824f9c4 commit 08f8b58

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/property/types/automation/CloudTelevision.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,14 @@ class CloudTelevision : public Property {
226226
setAttribute(_cloud_value.swi, "swi");
227227
setAttribute(_cloud_value.vol, "vol");
228228
setAttribute(_cloud_value.mut, "mut");
229+
/* PlaybackCommands and InputValue are enum of type int so we can safely disable
230+
* strict aliasing warnings here.
231+
*/
232+
#pragma GCC diagnostic push
233+
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
229234
setAttribute((int&)_cloud_value.pbc, "pbc");
230235
setAttribute((int&)_cloud_value.inp, "inp");
236+
#pragma GCC diagnostic pop
231237
setAttribute(_cloud_value.cha, "cha");
232238
}
233239
};

0 commit comments

Comments
 (0)