[libvirt] [PATCH] Don't inline virStringTrimOptionalNewline

Martin Kletzander mkletzan at redhat.com
Wed May 10 09:12:00 UTC 2017


On Wed, May 10, 2017 at 09:26:18AM +0100, Daniel P. Berrange wrote:
>GCC complains that inlining virStringTrimOptionalNewline is not
>likely on some platforms:
>
>  cc1: warnings being treated as errors
>  ../../src/util/virfile.c: In function 'virFileReadValueBitmap':
>  ../../src/util/virstring.h:292: error: inlining failed in call to 'virStringTrimOptionalNewline': call is unlikely and code size would grow [-Winline]
>  ../../src/util/virfile.c:3987: error: called from here [-Winline]
>
>Inlining this function is not going to be a measurable performance
>benefit either, since the time required to execute it is going to
>be dominated by running of strlen() over the string, not by the
>function call overhead.
>

Oh, definitely.  Just out of curiosity, though; what platform does this
happen on?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170510/f6aaf60f/attachment-0001.sig>


More information about the libvir-list mailing list