gcc8-8.2.1-alt5.x86_64 When compiling rpm-build (from Sisyphus), we see warnings like: interdep.c: In function 'makeReq1': interdep.c:116:8: warning: function called through a non-compatible type hge(pkg1->header, RPMTAG_REQUIRENAME, NULL, (void **) &reqNv, &c) && ^~~ interdep.c:117:8: warning: function called through a non-compatible type hge(pkg1->header, RPMTAG_REQUIREVERSION, NULL, (void **) &reqVv, NULL) && ^~~ interdep.c:118:8: warning: function called through a non-compatible type hge(pkg1->header, RPMTAG_REQUIREFLAGS, NULL, (void **) &reqFv, NULL); ^~~ where the source code is like this: const HGE_t hge = (HGE_t)headerGetEntryMinMemory; int ok = hge(pkg1->header, RPMTAG_REQUIRENAME, NULL, (void **) &reqNv, &c) && hge(pkg1->header, RPMTAG_REQUIREVERSION, NULL, (void **) &reqVv, NULL) && hge(pkg1->header, RPMTAG_REQUIREFLAGS, NULL, (void **) &reqFv, NULL); Removing the const qualifier makes the warning go away. Isn't it a strange reason to give a warning in this case? The const qualifier should affect just the variable where the pointer is stored and not the type of the function.