Commit 60655056672d28d88b246ecc97ba4b5a6e1dcdf4

Edward Thomson 2015-06-29T21:37:07

submodule: cast enum to int for compare

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/submodule.c b/src/submodule.c
index 796364b..2a12a97 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -741,7 +741,7 @@ const char *git_submodule_update_to_str(git_submodule_update_t update)
 {
 	int i;
 	for (i = 0; i < (int)ARRAY_SIZE(_sm_update_map); ++i)
-		if (_sm_update_map[i].map_value == update)
+		if (_sm_update_map[i].map_value == (int)update)
 			return _sm_update_map[i].str_match;
 	return NULL;
 }