nss: Fix warnings generated by getcwd
nss: Fix warnings generated by getcwd

getcwd() conforms to POSIX.1-2001 which leaves the behaviour when the
buf argument is NULL, undefined. This makes gcc 10+ throw the following
warning:

argument 1 is null but the corresponding size argument 2 value is 4096

Initially, this was fixed by disabling NSS_ENABLE_WERROR. This patch
re-enables NSS_ENABLE_WERROR (by leaving it to its default value) and
takes advantage of the existing functionality in nss that wraps the
getcwd call into a function making sure that the buf argument is always
properly allocated.

Signed-off-by: Andrei Gherzan <0401b4310c02ae595fc6a2b84ead073cab9b0442@huawei.com>
Signed-off-by: Khem Raj <729d64b6f67515e258459a5f6d20ec88b2caf8df@gmail.com>

moto-timo/meta-openembedded,VCTLabs/meta-openembedded,VCTLabs/meta-openembedded,schnitzeltony/meta-openembedded,VCTLabs/meta-openembedded,schnitzeltony/meta-openembedded,VCTLabs/meta-openembedded,VCTLabs/meta-openembedded,rehsack/meta-openembedded,openembedded/meta-openembedded,moto-timo/meta-openembedded,rehsack/meta-openembedded,moto-timo/meta-openembedded,openembedded/meta-openembedded,schnitzeltony/meta-openembedded,openembedded/meta-openembedded,rehsack/meta-openembedded,schnitzeltony/meta-openembedded,schnitzeltony/meta-openembedded,moto-timo/meta-openembedded,rehsack/meta-openembedded,VCTLabs/meta-openembedded,openembedded/meta-openembedded,openembedded/meta-openembedded,schnitzeltony/meta-openembedded,schnitzeltony/meta-openembedded,openembedded/meta-openembedded,openembedded/meta-openembedded,VCTLabs/meta-openembedded,rehsack/meta-openembedded,rehsack/meta-openembedded,openembedded/meta-openembedded,moto-timo/meta-openembedded,rehsack/meta-openembedded,VCTLabs/meta-openembedded