|
From: Eliot M. <mo...@cs...> - 2014-09-24 11:39:51
|
On 9/24/2014 5:31 AM, Skarakis, Konstantinos wrote: > I really appreciate this patch. It’s exactly what I was looking for. I must be doing something wrong > though. When I apply the patch and try to “make” I get this error: > > m_options.c: In function âvgPlain_expand_file_nameâ: > > m_options.c:244: warning: assignment discards qualifiers from pointer target type > > m_options.c:252: error: assignment of read-only location â*(format + (long unsigned int)(long > unsigned int)i)â > > m_options.c:253: warning: pointer targets in passing argument 1 of âvgPlain_strlenâ differ in signedness > > m_options.c:254: warning: pointer targets in passing argument 1 of âvgPlain_strcpyâ differ in signedness > > m_options.c:254: warning: pointer targets in passing argument 2 of âvgPlain_strcpyâ differ in signedness > > m_options.c:256: error: assignment of read-only location â*(format + (long unsigned int)(long > unsigned int)i)â > > m_options.c:279: warning: pointer targets in initialization differ in signedness > > m_options.c:279: warning: pointer targets in initialization differ in signedness > > m_options.c:280: warning: pointer targets in passing argument 1 of âvgPlain_execvâ differ in signedness > > m_options.c:280: warning: passing argument 2 of âvgPlain_execvâ from incompatible pointer type > > m_options.c:327: warning: implicit declaration of function âvgPlain_sigemptysetâ > > m_options.c:330: warning: implicit declaration of function âvgPlain_sigactionâ > > m_options.c:335: warning: implicit declaration of function âvgPlain_convert_sigaction_fromK_to_toKâ > > m_options.c:346: warning: pointer targets in passing argument 1 of âvgPlain_strlenâ differ in signedness > > m_options.c:346: warning: pointer targets in passing argument 1 of âvgPlain_strlenâ differ in signedness > > Line 252 is: > > format[i] = 0; > > Line 256 is: > > format[i] = ‘}’; > > Maybe I didn’t apply the patch right… The patch is against a somewhat older version of valgrind, and was also never tested in other OS environments than my own. My sense of the above is that some declarations need adjustment around signed/unsigned and const or not, or else rather than modifying 'format' in place, the code needs to copy the relevant part out to a separate string. Also, some of the routines I called in the code (execva, sigaction, strlen) seem not to have their proper declarations available. I am sure this can all be solved, but I am not sure when I will have time to work on porting it forward to present day valgrind. Thoughts from the list? Regards -- Eliot Moss |