File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,12 @@ static void ExpandIfNeccessary(Seq *seq)
9090 }
9191}
9292
93+ int StrCmpWrapper (const void * s1 , const void * s2 , void * user_data )
94+ {
95+ UNUSED (user_data );
96+ return strcmp (s1 , s2 );
97+ }
98+
9399void SeqSet (Seq * seq , size_t index , void * item )
94100{
95101 assert (seq != NULL );
Original file line number Diff line number Diff line change @@ -99,6 +99,22 @@ void SeqSoftDestroy(Seq *seq);
9999 */
100100typedef int (* SeqItemComparator ) (const void * , const void * , void * user_data );
101101
102+ /**
103+ @brief Wrapper of the standard library function strcmp.
104+ Used to avoid cast-function-type compiler warnings when
105+ casting strcmp to (SeqItemComparator) in sequence functions.
106+
107+ @param [in] s1 The string being compared to the s2 string
108+ @param [in] s2 The string that s1 is compared to
109+ @param [in] user_data This parameter is the ignored user_data that the SeqItemComparator
110+ expects
111+
112+ @return 0 if s1 and s2 strings are equal
113+ @return negative if s1 is less than s2
114+ @return positive if s1 is greater than s2
115+ */
116+ int StrCmpWrapper (const void * s1 , const void * s2 , void * user_data );
117+
102118void SeqSet (Seq * set , size_t index , void * item );
103119
104120/**
You can’t perform that action at this time.
0 commit comments