• Derek Mauro's avatar
    Work around a maybe-uninitialized warning under GCC 12 · 0320f517
    Derek Mauro authored
    Some Mock constructors insert the pointer to the Mock itself into a
    global registry. Since GCC cannot see how the pointer is used (only as
    an identifier), it cannot tell that the object doesn't need to be
    initialized at that point at all. Work around this by using uintptr_t
    instead.
    
    PiperOrigin-RevId: 452380347
    Change-Id: Ia5a493057ed90719de1d0efab71de9a8a08ddf8b
    0320f517
gmock-spec-builders.cc 28.2 KB