• Kenneth Moreland's avatar
    Try to fix uninitialized anonymous variable warning · 7518d067
    Kenneth Moreland authored
    The code from the previous commit was causing one of the dashboards,
    which is using gcc-7, to produce the following warning:
    In file included from ../testing/UnitTestVariant.cxx:11:0:
    ../Variant.h: In function 'void {anonymous}::TestCopyDestroy()':
    ../Variant.h:269:5: warning: '<anonymous>' may be used uninitialized in this function [-Wmaybe-uninitialized]
         this->Storage = std::move(rhs.Storage);
    At best, this warning is not helpful as it does not seem to point to
    anything that could be used uninitialized. At worst, it might be a
    compiler bug. A Google search finds a few similar bugs although none I
    can assert with any confidence of this issue. However, many reported
    bugs and issues point to the use of anonymous namespaces. So, I'm going
    to attempt to fix the problem by removing anonymous namespaces.
    Hopefully it will fix the warning or at least point me to something
    concrete that I can fix.