bring declaration outside of for loop statement body
diff --git a/src/attr.c b/src/attr.c
index 6c3d14e..559f535 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -651,10 +651,11 @@
 			if (!error) {
 				int length = strlen(path);
 				char *attr_file_parent_path = malloc((length + 1) * sizeof(char));
+				int i;
 
 				// Then push potential gitattribute files along the path components
 				// of the full file path.
-				for (int i = 0; i < length; i++) {
+				for (i = 0; i < length; i++) {
 					if (path[i] == '/') {
 						strncpy(attr_file_parent_path, path, i);