From: Bart Van Assche Date: Mon, 23 Feb 2009 19:12:02 +0000 (+0000) Subject: Declared those function arguments that are not modified as const. X-Git-Tag: svn/VALGRIND_3_5_0~931 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c717c5071de4f66032039675739e5fe13b97e92b;p=thirdparty%2Fvalgrind.git Declared those function arguments that are not modified as const. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9245 --- diff --git a/coregrind/m_oset.c b/coregrind/m_oset.c index aeb7341b14..27ede919b5 100644 --- a/coregrind/m_oset.c +++ b/coregrind/m_oset.c @@ -174,7 +174,7 @@ void* fast_key_of_node(AvlNode* n) } // Compare the first word of each element. Inlining is *crucial*. -static inline Word fast_cmp(void* k, AvlNode* n) +static inline Word fast_cmp(const void* k, const AvlNode* n) { UWord w1 = *(UWord*)k; UWord w2 = *(UWord*)elem_of_node(n); @@ -785,7 +785,7 @@ Bool VG_(OSetWord_Next)(AvlTree* t, UWord* val) // produced VG_(OSetGen_Next) is the smallest key in the map // >= start_at. Naturally ">=" is defined by the comparison // function supplied to VG_(OSetGen_Create). -void VG_(OSetGen_ResetIterAt)(AvlTree* oset, void* k) +void VG_(OSetGen_ResetIterAt)(AvlTree* oset, const void* k) { Int i; AvlNode *n, *t; diff --git a/include/pub_tool_oset.h b/include/pub_tool_oset.h index c496523fb3..d01e2f6296 100644 --- a/include/pub_tool_oset.h +++ b/include/pub_tool_oset.h @@ -250,7 +250,7 @@ extern void* VG_(OSetGen_Next) ( OSet* os ); // produced VG_(OSetGen_Next) is the smallest key in the map // >= start_at. Naturally ">=" is defined by the comparison // function supplied to VG_(OSetGen_Create). -extern void VG_(OSetGen_ResetIterAt) ( OSet* oset, void* key ); +extern void VG_(OSetGen_ResetIterAt) ( OSet* oset, const void* key ); #endif // __PUB_TOOL_OSET_H