Forum: Compiler & IDEs warning: assignment discards qualifiers from pointer target type


von shirin (Gast)


Lesenswert?

Hallo,

ich habe die Compilerwarnung:

warning: assignment discards qualifiers from pointer target type

ich habe folgende code

in konstant.h
extern char const * const alfa_Group[];

in conf.h
steht

struct conf{
....
char const ** group;
.....
};

ich versuche in file conf.c

in func struct conf * set_conf(struct conf * cf)
{
     cf->group=alf_Group;
}

wo mache ich Falsche?

Danke

von Jörg W. (dl8dtl) (Moderator) Benutzerseite


Lesenswert?

Ein
1
char const **
ist was anderes als ein
1
char const * const *

von shirin (Gast)


Lesenswert?

Danke, Das Problem ist gelöst.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.