Browse code

libclamav: fix compilation error with Sun's compiler

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@722 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2004/08/05 03:10:59
Showing 4 changed files
... ...
@@ -1,3 +1,8 @@
1
+Wed Aug  4 20:01:26 CEST 2004 (tk)
2
+----------------------------------
3
+  * libclamav: fix compilation error with Sun's compiler (reported by
4
+	       Alex S Moore <asmoore*edge.net>)
5
+
1 6
 Wed Aug  4 19:06:52 CEST 2004 (tk)
2 7
 ----------------------------------
3 8
   * libclamav: re-activate new mail detection mechanism
... ...
@@ -98,7 +98,8 @@ struct cli_ac_node {
98 98
 };
99 99
 
100 100
 struct cli_md5_node {
101
-    char *virname, *viralias, *md5;
101
+    char *virname, *viralias;
102
+    unsigned char *md5;
102 103
     unsigned int size;
103 104
     struct cli_md5_node *next;
104 105
 };
... ...
@@ -57,7 +57,7 @@ int cl_scanbuff(const char *buffer, unsigned int length, const char **virname, c
57 57
     return ret;
58 58
 }
59 59
 
60
-static struct cli_md5_node *cli_vermd5(const char *md5, const struct cl_node *root)
60
+static struct cli_md5_node *cli_vermd5(const unsigned char *md5, const struct cl_node *root)
61 61
 {
62 62
 	struct cli_md5_node *pt;
63 63
 
... ...
@@ -242,5 +242,5 @@ int cl_buildtrie(struct cl_node *root) /* for backward compatibility */
242 242
 
243 243
 void cl_freetrie(struct cl_node *root) /* for backward compatibility */
244 244
 {
245
-    return cl_free(root);
245
+    cl_free(root);
246 246
 }
... ...
@@ -482,7 +482,7 @@ static int cli_loadhdb(FILE *fd, struct cl_node **root, int *virnum)
482 482
 	    break;
483 483
 	}
484 484
 
485
-	if(!(new->md5 = cli_hex2str(pt))) {
485
+	if(!(new->md5 = (unsigned char *) cli_hex2str(pt))) {
486 486
 	    cli_errmsg("Malformed MD5 string at line %d\n", line);
487 487
 	    free(pt);
488 488
 	    free(new);