[Toybox] [PATCH] tar: fix warn_unused_result error.
enh
enh at google.com
Fri Sep 3 08:55:46 PDT 2021
On Fri, Sep 3, 2021 at 8:48 AM Rob Landley <rob at landley.net> wrote:
> On 9/2/21 2:58 PM, enh wrote:
> > That's why android-ndk-r21d isn't producing this warning.
> >
> > yeah, sorry: this is for the _host_ toybox (so glibc right now).
>
> It's not doing it in my host build. Do I have to #define FORTIFY_STUFF
> somewhere...
>
> # if __USE_FORTIFY_LEVEL > 0
> # define __wur __attribute_warn_unused_result__
> # endif
> #else
> # define __attribute_warn_unused_result__ /* empty */
> #endif
>
> Apparently so. Sigh.
>
yeah, all of Android (device and host) builds with _FORTIFY_SOURCE=2.
> > adding more of these to bionic has been on the to-do list for years, but
> turning
> > up warnings is always a hard slog... (see my comment about updating the
> > compiler in my previous response!)
>
> I'm happy for it NOT to produce this warning, I'm just trying to reproduce
> the
> one you wanted to eliminate. :)
>
iirc the ones that are in bionic aren't tied to __FORTIFY_SOURCE (since
that doesn't make much difference for the platform anyway; see above).
> > Would upgrading to a
> > newer version get it,
> >
> > not until i add more annotations to bionic, no :-)
> >
> > or is this more aosp-vs-ndk version skew? (And is there an
> > easy way to build external packages with the AOSP prebuilt
> toolchain?)
> >
> > if you actually find yourself in a situation where bionic has something
> that
> > isn't in the NDK yet, it's probably easier to update the sysroot (which
> only
> > requires an NDK manifest checkout, not a full AOSP manifest checkout):
> >
> >
> https://android.googlesource.com/platform/ndk/+/master/docs/PlatformApis.md#updating-the-sysroot
> > <
> https://android.googlesource.com/platform/ndk/+/master/docs/PlatformApis.md#updating-the-sysroot
> >
>
> Someday I would like to figure out how to build the NDK from source, but I
> have
> zero spare bandwidth at the moment...
>
https://android.googlesource.com/platform/ndk/+/master/docs/Building.md
> Rob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210903/d8c389e2/attachment-0001.htm>
More information about the Toybox
mailing list