On Thu, Aug 25, 2022 at 4:37 PM Gert Doering <g...@greenie.muc.de> wrote:

> Hi,
>
> On Wed, Aug 24, 2022 at 06:57:18PM +0200, Arne Schwabe wrote:
> >   Error: test_provider.c(74): error C2099: initializer is not a constant
> >
> > Fix this issue by making the const char* to const char[]. This is
> probably
> > of one the weird array decay corner cases
>
> Out of curiosity - does the error go away if you just remove all these
> "const" from the declaration?  Making this just a "static char *"?
>

The  const after * in the original was to make the pointer a compile-time
constant and usable as an initializer. Else even gcc and clang will error
out. The const before * indicating the value is a constant could be
removed, but the value is in fact a constant string literal, so why do
so....

Anyway, for some reason MSVC doesn't seem to accept any form other than
what Arne proposed. Unless we define pubkeys[] using the three string
literals directly and eliminate those intermediate vars (pubkey1, 2, 3).
.
Selva
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to