Browse Source

Fix build

Jeremy Soller 7 years ago
parent
commit
07c3ce02be
2 changed files with 3 additions and 2 deletions
  1. 1 1
      src/ctype/src/lib.rs
  2. 2 1
      tests/ctype.c

+ 1 - 1
src/ctype/src/lib.rs

@@ -73,7 +73,7 @@ pub extern "C" fn isblank(c: c_int) -> c_int {
 
 #[no_mangle]
 /// The comment in musl:
-/// `/* nonsense function that should NEVER be used! */`
+/// /* nonsense function that should NEVER be used! */
 pub extern "C" fn toascii(c: c_int) -> c_int {
     c & 0x7f
 }

+ 2 - 1
tests/ctype.c

@@ -26,8 +26,9 @@ size_t num_test_cases = sizeof(test_cases)/sizeof(struct test_case);
         printf("Unexpected result: " #fn "('%c') != %d\n", tc.c, tc.fn); \
     }
 int main(int argc, char* argv[]) {
+    int i;
     int retval = 0;
-    for(int i = 0; i < num_test_cases; ++i) {
+    for(i = 0; i < num_test_cases; ++i) {
         struct test_case tc = test_cases[i];
         CHECK_TEST(tc, isalnum, retval);
         CHECK_TEST(tc, isalpha, retval);