This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Jan

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]