adding a few minor changes to eliminate warnings, the most interesting of which was a missing function prototype for cache_get_MD5.

This commit is contained in:
Micah Snyder 2017-08-10 15:40:52 -04:00
parent 3e02c8cd1b
commit dd2ed14ddb
4 changed files with 8 additions and 4 deletions

View file

@ -1,7 +1,7 @@
/*
* JIT compile ClamAV bytecode.
*
* Copyright (C) 2015 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
* Copyright (C) 2015, 2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
* Copyright (C) 2009-2010 Sourcefire, Inc.
*
* Authors: Török Edvin
@ -2429,7 +2429,7 @@ static void setGuard(unsigned char* guardbuf)
for(unsigned i = 16; i < 48; i++)
salt[i] = cli_rndnum(255);
cl_hash_data("md5", salt, 48, guardbuf, NULL);
cl_hash_data((char*)"md5", salt, 48, guardbuf, NULL);
}
#if LLVM_VERSION < 32
static void addFPasses(FunctionPassManager &FPM, bool trusted, const TargetData *TD)

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2015 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
* Copyright (C) 2015, 2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
* Copyright (C) 2010 Sourcefire, Inc.
*
* Authors: aCaB <acab@clamav.net>
@ -31,4 +31,7 @@ void cache_remove(unsigned char *md5, size_t size, const struct cl_engine *engin
int cache_check(unsigned char *hash, cli_ctx *ctx);
int cli_cache_init(struct cl_engine *engine);
void cli_cache_destroy(struct cl_engine *engine);
int cache_get_MD5(unsigned char *hash, cli_ctx *ctx);
#endif

View file

@ -1241,7 +1241,7 @@ parseRootMHTML(mbox_ctx *mctx, message *m, text *t)
rhtml = cli_jsonobj(mctx->wrkobj, "RootHTML");
if (rhtml != NULL) {
/* MHTML-specific properties */
cli_jsonstr(rhtml, "Encoding", htmlGetMetaEncoding(htmlDoc));
cli_jsonstr(rhtml, "Encoding", (const char*)htmlGetMetaEncoding(htmlDoc));
cli_jsonint(rhtml, "CompressMode", xmlGetDocCompressMode(htmlDoc));
}
}

View file

@ -106,6 +106,7 @@
#include "msxml.h"
#include "tiff.h"
#include "hwp.h"
#include "msdoc.h"
#ifdef HAVE_BZLIB_H
#include <bzlib.h>