You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only sign compare warning in "string-list" is that we compare the
`index` of the `int` type with the `list->nr` of unsigned type. We get
index by calling "get_entry_index", which would always return unsigned
index.
Let's change the return type of "get_entry_index" to be "size_t" by
slightly modifying the binary search algorithm. Instead of letting
"left" to be "-1" initially, assign 0 to it.
Then, we could delete "#define DISABLE_SIGN_COMPARE_WARNING" to enable
sign warnings check for "string-list"
Signed-off-by: shejialuo <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
0 commit comments