[libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

Martin Kletzander mkletzan at redhat.com
Thu Jul 13 08:02:29 UTC 2017


On Wed, Jul 12, 2017 at 05:07:56PM +0100, Daniel P. Berrange wrote:
>On Wed, Jul 12, 2017 at 01:56:47PM +0200, Martin Kletzander wrote:
>> Also, having the weak alias we can drop all the mocks and the problems
>> with them and just redefine the functions we would like to mock in the
>> tests (see tests/virfilewrapper.c), it would work on win32, it would
>> not compile if we would forgot to make the function as an alias (so no
>> need to check that in the syntax-check) and maybe provide other benefits
>> that I can't think of right now.
>
>Empirically I'm not seeing any compiler warnings if i take this approach
>and don't mark the function as an alias.
>

Oooh, me too :(  That's a pity; yet another thing that proves I still
don't _fully_ understand the details behind everything.
-------------- 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/20170713/3723b69a/attachment-0001.sig>


More information about the libvir-list mailing list