[lld] r287797 - Fix uninitialized variable access.

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 20:18:39 PST 2016


On Wed, Nov 23, 2016 at 11:03 AM, Rui Ueyama via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: ruiu
> Date: Wed Nov 23 13:03:35 2016
> New Revision: 287797
>
> URL: http://llvm.org/viewvc/llvm-project?rev=287797&view=rev
> Log:
> Fix uninitialized variable access.
>
> Modified:
>     lld/trunk/ELF/Config.h
>
> Modified: lld/trunk/ELF/Config.h
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Config.
> h?rev=287797&r1=287796&r2=287797&view=diff
> ============================================================
> ==================
> --- lld/trunk/ELF/Config.h (original)
> +++ lld/trunk/ELF/Config.h Wed Nov 23 13:03:35 2016
> @@ -145,7 +145,7 @@ struct Configuration {
>    uint16_t DefaultSymbolVersion = llvm::ELF::VER_NDX_GLOBAL;
>    uint16_t EMachine = llvm::ELF::EM_NONE;
>    uint64_t EntryAddr = 0;
> -  uint64_t ErrorLimit;
> +  uint64_t ErrorLimit = 20; // initialize it early so that error() won't
> complain
>

Captialization and period at the end is needed.

http://llvm.org/docs/CodingStandards.html#commenting

-- Sean Silva


>    uint64_t ImageBase;
>    uint64_t MaxPageSize;
>    uint64_t ZStackSize;
>
>
> _______________________________________________
> 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/20161123/0b5aa875/attachment.html>


More information about the llvm-commits mailing list