Game Kit: Fix -Werror=class-memaccess

Replace memset() with media_format.Clear() to fix
-Werror=class-memaccess, pointed by gcc8.

Change-Id: I87a72ac06947e90c468deda6bf6d7bb3b5fb4003
Reviewed-on: https://review.haiku-os.org/c/1113
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Murai Takashi
2019-02-28 18:58:46 +00:00
committed by waddlesplash
parent 88d7c7740a
commit 1f0635d227
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -406,7 +406,7 @@ BFileGameSound::Init(const entry_ref* file)
gs_audio_format dformat = Device()->Format();
// request the format we want the sound
memset(&playFormat, 0, sizeof(media_format));
playFormat.Clear();
playFormat.type = B_MEDIA_RAW_AUDIO;
if (fAudioStream->stream->DecodedFormat(&playFormat) != B_OK) {
fAudioStream->file->ReleaseTrack(fAudioStream->stream);
+1 -1
View File
@@ -159,7 +159,7 @@ BSimpleGameSound::Init(const entry_ref* inFile)
int64 frames = audioStream->CountFrames();
memset(&mformat, 0, sizeof(media_format));
mformat.Clear();
mformat.type = B_MEDIA_RAW_AUDIO;
// mformat.u.raw_audio.byte_order
// = (B_HOST_IS_BENDIAN) ? B_MEDIA_BIG_ENDIAN : B_MEDIA_LITTLE_ENDIAN;