Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 318113de authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by Chih-hung Hsieh
Browse files

Suppress sizeof warnings on unusual malloc

These calls are unusual to use sizeof(T1) and cast result to (T2*).
The code look correct and intentional.
So we use NOLINTNEXTLINE to suppress the warning.

Bug: 261919363
Test: make tidy-frameworks-av-media-libstagefright_subset
Change-Id: Iba72049e40b69d091c14b7237498d45291556ae8
parent ce466807
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ status_t OggWriter::addSource(const sp<MediaSource>& source) {
        return ERROR_UNSUPPORTED;
    }

    // NOLINTNEXTLINE(clang-analyzer-unix.MallocSizeof)
    mOs = (OggStreamState*) malloc(sizeof(ogg_stream_state));
    if (ogg_stream_init((ogg_stream_state*)mOs, rand()) == -1) {
        ALOGE("ogg stream init failed");