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

Commit 9709a1f0 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

fix compiler error under FORTIFY_SOURCE=2

frameworks/base/libs/androidfw/ObbFile.cpp:340:5: error: ignoring return value of function declared with warn_unused_result attribute [-Werror,-Wunused-result]
    ftruncate(fd, mFooterStart);
    ^~~~~~~~~ ~~~~~~~~~~~~~~~~
1 error generated.
amake: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libandroidfw_intermediates/ObbFile.o] Error 1

Change-Id: I7080d64e7a830a10b41c1ebf33c60d32b7c8356e
parent e60077e6
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -337,7 +337,9 @@ bool ObbFile::removeFrom(int fd)
        return false;
    }

    ftruncate(fd, mFooterStart);
    if (ftruncate(fd, mFooterStart) == -1) {
        return false;
    }

    return true;
}