This is the mail archive of the
mailing list for the elfutils project.
Re: [patch 2/4] Code cleanup: Remove const in prototype
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Thu, 14 Nov 2013 20:23:27 +0100
- Subject: Re: [patch 2/4] Code cleanup: Remove const in prototype
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.