[llvm] r277021 - [pdb] Fix some warnings that break -Werror builds.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 1 11:16:44 PDT 2016


On Thu, Jul 28, 2016 at 12:25 PM Zachary Turner via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: zturner
> Date: Thu Jul 28 14:18:02 2016
> New Revision: 277021
>
> URL: http://llvm.org/viewvc/llvm-project?rev=277021&view=rev
> Log:
> [pdb] Fix some warnings that break -Werror builds.
>
> Modified:
>     llvm/trunk/include/llvm/DebugInfo/Msf/StreamRef.h
>     llvm/trunk/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp
>
> Modified: llvm/trunk/include/llvm/DebugInfo/Msf/StreamRef.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/StreamRef.h?rev=277021&r1=277020&r2=277021&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/DebugInfo/Msf/StreamRef.h (original)
> +++ llvm/trunk/include/llvm/DebugInfo/Msf/StreamRef.h Thu Jul 28 14:18:02
> 2016
> @@ -17,7 +17,7 @@ namespace llvm {
>  namespace msf {
>  template <class StreamType, class RefType> class StreamRefBase {
>  public:
> -  StreamRefBase() : Stream(nullptr), Length(0), ViewOffset(0) {}
> +  StreamRefBase() : Stream(nullptr), ViewOffset(0), Length(0) {}
>

Might just be easier to use non-static data member initializers than trying
to keep these in sync with the declaration order? (& then just have a
"StreamRefBase() {}" (or "= default" if that works on all our compilers))


>    StreamRefBase(const StreamType &Stream, uint32_t Offset, uint32_t
> Length)
>        : Stream(&Stream), ViewOffset(Offset), Length(Length) {}
>
>
> Modified: llvm/trunk/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp?rev=277021&r1=277020&r2=277021&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp (original)
> +++ llvm/trunk/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp Thu Jul 28
> 14:18:02 2016
> @@ -198,9 +198,9 @@ Error DbiStreamBuilder::finalize() {
>    DbiStreamHeader *H = Allocator.Allocate<DbiStreamHeader>();
>
>    if (auto EC = generateModiSubstream())
> -    return std::move(EC);
> +    return EC;
>    if (auto EC = generateFileInfoSubstream())
> -    return std::move(EC);
> +    return EC;
>
>    H->VersionHeader = *VerHeader;
>    H->VersionSignature = -1;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160801/fbd373ef/attachment.html>


More information about the llvm-commits mailing list