public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ard.biesheuvel@linaro.org>
To: edk2-devel-groups-io <devel@edk2.groups.io>,
	Laszlo Ersek <lersek@redhat.com>
Cc: "Feng, Bob C" <bob.c.feng@intel.com>
Subject: Re: [edk2-devel] [PATCH] OvmfPkg/QemuKernelLoaderFsDxe: drop tentative const object definition
Date: Sat, 7 Mar 2020 15:22:14 +0100	[thread overview]
Message-ID: <CAKv+Gu8pnqfU9SmamWK75RzQqixuGMbZ86J004nvhftXCAtdsA@mail.gmail.com> (raw)
In-Reply-To: <b3d0d03e-2a8f-5560-e3d7-f325431a3bd0@redhat.com>

On Fri, 6 Mar 2020 at 20:22, Laszlo Ersek <lersek@redhat.com> wrote:
>
> On 03/06/20 17:40, Ard Biesheuvel wrote:
> > On Fri, 6 Mar 2020 at 17:14, Laszlo Ersek <lersek@redhat.com> wrote:
> >>
> >> On 03/06/20 08:38, Ard Biesheuvel wrote:
> >>> Bob reports that VS2017 chokes on a tentative definition of the const
> >>> object 'mEfiFileProtocolTemplate', with the following error:
> >>>
> >>>   OvmfPkg\QemuKernelLoaderFsDxe\QemuKernelLoaderFsDxe.c(130):
> >>>       error C2220: warning treated as error - no 'object' file generated
> >>>   OvmfPkg\QemuKernelLoaderFsDxe\QemuKernelLoaderFsDxe.c(130):
> >>>       warning C4132: 'mEfiFileProtocolTemplate': const object should be initialized
> >>>
> >>> Let's turn the only function that relies on this tentative definition
> >>> into a forward declaration itself, and move its definition after the
> >>> normal definition of the object. That allows us to drop the tentative
> >>
> >> (1) s/normal/external/
> >>
> >
> > Are you sure? The const object has static linkage.
>
> Yes, I'm sure.
>

:-)

I should have known better than to doubt you on a matter like this ...

Thanks for the explanation.

  reply	other threads:[~2020-03-07 14:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06  7:38 [PATCH] OvmfPkg/QemuKernelLoaderFsDxe: drop tentative const object definition Ard Biesheuvel
2020-03-06 16:14 ` Laszlo Ersek
2020-03-06 16:40   ` Ard Biesheuvel
2020-03-06 19:22     ` Laszlo Ersek
2020-03-07 14:22       ` Ard Biesheuvel [this message]
2020-03-08  1:22         ` [edk2-devel] " Bob Feng
2020-03-08  8:59           ` Laszlo Ersek
2020-03-10  8:55             ` Bob Feng
2020-03-08  9:01         ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKv+Gu8pnqfU9SmamWK75RzQqixuGMbZ86J004nvhftXCAtdsA@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox