[patch 2/4] Code cleanup: Remove const in prototype

Jan Kratochvil jan.kratochvil at redhat.com
Thu Nov 14 19:23:27 UTC 2013


On Thu, 14 Nov 2013 20:19:32 +0100, Mark Wielaard wrote:
> I think removing the const is harmless like you said. A const int is
> passed by value, so is only a hint to the caller. But I am surprised you
> need this. We does the parameter need to be modified? Can't you just
> pass firstreg + 1 or first assign to a local var before passing the
> (const) int around?

I could cope with such prototype in the code various ways but I primarily
found it a typo to leave cv-qualifier in function prototype in .h file.

TBH I do not see what it can hint to the caller.


Jan


More information about the elfutils-devel mailing list