]> granicus.if.org Git - check/commitdiff
tests: cast output of malloc() to goal type
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Wed, 30 Jul 2014 12:49:11 +0000 (12:49 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Wed, 30 Jul 2014 12:49:11 +0000 (12:49 +0000)
clang++ did not like casting void* to char* implicitly.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1185 64e312b2-a51f-0410-8e61-82d0ca0eb02a

tests/check_check_master.c

index 0484488cb7f9c1c0ae0ef40c521076bab7aaea85..af5c7584f50a4f9c9734716b7093e5931afd2799 100644 (file)
@@ -282,7 +282,7 @@ char * escape_percent(const char *original, size_t original_size);
 char * escape_percent(const char *original, size_t original_size)
 {
   /* In the worst case every character is a %*/
-  char *result = malloc(original_size*2);
+  char *result = (char*)malloc(original_size*2);
 
   size_t read_index;
   size_t write_index;