Fix warnings

git-svn: trunk@2694
remotes/push_mirror/metadata
Nigel Horne 19 years ago
parent 3c30b19b46
commit b02bab2b5d
  1. 7
      clamav-devel/ChangeLog
  2. 8
      clamav-devel/libclamav/blob.c
  3. 4
      clamav-devel/libclamav/blob.h
  4. 4
      clamav-devel/libclamav/message.c
  5. 16
      clamav-devel/libclamav/pdf.c
  6. 4
      clamav-devel/libclamav/untar.c

@ -1,3 +1,8 @@
Sat Feb 10 14:22:29 GMT 2007 (njh)
----------------------------------
* libclamav: Removed warnings introduced by the stricter argument checks
in others.h and output.h
Sat Feb 10 14:38:20 CET 2007 (tk)
---------------------------------
* libclamav/others.h, shared/output.h: try to check coding styles for output
@ -18,7 +23,7 @@ Fri Feb 9 22:25:24 CET 2007 (tk)
Fri Feb 9 21:12:28 CET 2007 (acab)
-----------------------------------
* libclamav: Fix win32 compilation error in upack and mew - thanks Nigel
Fri Feb 9 17:57:15 GMT 2007 (njh)
----------------------------------
* libclamav/lockdb.c: Fix compilation error, bug 234

@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
static char const rcsid[] = "$Id: blob.c,v 1.61 2007/02/01 12:42:18 njh Exp $";
static char const rcsid[] = "$Id: blob.c,v 1.62 2007/02/10 14:21:46 njh Exp $";
#if HAVE_CONFIG_H
#include "clamav-config.h"
@ -198,7 +198,7 @@ blobAddData(blob *b, const unsigned char *data, size_t len)
b->size = growth;
b->data = cli_malloc(growth);
} else if(b->size < b->len + len) {
} else if(b->size < b->len + (off_t)len) {
unsigned char *p = cli_realloc(b->data, b->size + growth);
if(p == NULL)
@ -271,7 +271,7 @@ blobClose(blob *b)
if(b->len == 0) { /* Not likely */
free(b->data);
b->data = NULL;
cli_dbgmsg("blobClose: recovered all %u bytes\n",
cli_dbgmsg("blobClose: recovered all %lu bytes\n",
b->size);
b->size = 0;
} else {
@ -280,7 +280,7 @@ blobClose(blob *b)
if(ptr == NULL)
return;
cli_dbgmsg("blobClose: recovered %u bytes from %u\n",
cli_dbgmsg("blobClose: recovered %lu bytes from %lu\n",
b->size - b->len, b->size);
b->size = b->len;
b->data = ptr;

@ -26,8 +26,8 @@
typedef struct blob {
char *name; /* filename */
unsigned char *data; /* the stuff itself */
size_t len; /* number of bytes of data so far */
size_t size; /* number of bytes allocated to data so far */
off_t len; /* number of bytes of data so far */
off_t size; /* number of bytes allocated to data so far */
int isClosed;
#ifdef CL_DEBUG
object_type magic; /* verify that this is a blob */

@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
static char const rcsid[] = "$Id: message.c,v 1.193 2007/01/07 21:30:49 njh Exp $";
static char const rcsid[] = "$Id: message.c,v 1.194 2007/02/10 14:21:46 njh Exp $";
#if HAVE_CONFIG_H
#include "clamav-config.h"
@ -1043,7 +1043,7 @@ messageExport(message *m, const char *dir, void *(*create)(void), void (*destroy
if((t_line = binhexBegin(m)) != NULL) {
unsigned char byte;
size_t newlen = 0L, len, dataforklen, resourceforklen, l;
unsigned long newlen = 0L, len, dataforklen, resourceforklen, l;
unsigned char *data;
char *ptr;
int bytenumber;

@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
static char const rcsid[] = "$Id: pdf.c,v 1.59 2007/02/10 11:21:40 njh Exp $";
static char const rcsid[] = "$Id: pdf.c,v 1.60 2007/02/10 14:21:46 njh Exp $";
#if HAVE_CONFIG_H
#include "clamav-config.h"
@ -50,8 +50,8 @@ static char const rcsid[] = "$Id: pdf.c,v 1.59 2007/02/10 11:21:40 njh Exp $";
#include "mbox.h"
#include "pdf.h"
static int flatedecode(const unsigned char *buf, size_t len, int fout, const cli_ctx *ctx);
static int ascii85decode(const char *buf, size_t len, unsigned char *output);
static int flatedecode(const unsigned char *buf, off_t len, int fout, const cli_ctx *ctx);
static int ascii85decode(const char *buf, off_t len, unsigned char *output);
static const char *pdf_nextlinestart(const char *ptr, size_t len);
static const char *pdf_nextobject(const char *ptr, size_t len);
static const char *cli_pmemstr(const char *haystack, size_t hs, const char *needle, size_t ns);
@ -390,7 +390,7 @@ cli_pdf(const char *dir, int desc, const cli_ctx *ctx)
/* flate inflation - returns zlib status, e.g. Z_OK */
static int
flatedecode(const unsigned char *buf, size_t len, int fout, const cli_ctx *ctx)
flatedecode(const unsigned char *buf, off_t len, int fout, const cli_ctx *ctx)
{
int zstat;
off_t nbytes;
@ -439,10 +439,10 @@ flatedecode(const unsigned char *buf, size_t len, int fout, const cli_ctx *ctx)
break;
default:
if(stream.msg)
cli_warnmsg("pdf: after writing %u bytes, got error \"%s\" inflating PDF attachment\n",
cli_warnmsg("pdf: after writing %lu bytes, got error \"%s\" inflating PDF attachment\n",
nbytes, stream.msg);
else
cli_warnmsg("pdf: after writing %u bytes, got error %d inflating PDF attachment\n",
cli_warnmsg("pdf: after writing %lu bytes, got error %d inflating PDF attachment\n",
nbytes, zstat);
inflateEnd(&stream);
return zstat;
@ -477,7 +477,7 @@ flatedecode(const unsigned char *buf, size_t len, int fout, const cli_ctx *ctx)
* See http://www.piclist.com/techref/method/encode.htm (look for base85)
*/
static int
ascii85decode(const char *buf, size_t len, unsigned char *output)
ascii85decode(const char *buf, off_t len, unsigned char *output)
{
const char *ptr;
uint32_t sum = 0;
@ -489,7 +489,7 @@ ascii85decode(const char *buf, size_t len, unsigned char *output)
ptr = buf;
cli_dbgmsg("cli_pdf: ascii85decode %u bytes\n", len);
cli_dbgmsg("cli_pdf: ascii85decode %lu bytes\n", len);
while(len > 0) {
int byte = (len--) ? (int)*ptr++ : EOF;

@ -20,7 +20,7 @@
* Author: Charles G. Waldman (cgw@pgt.com), Aug 4 1998
* There are many tar files that this code cannot decode.
*/
static char const rcsid[] = "$Id: untar.c,v 1.33 2006/12/22 18:29:13 njh Exp $";
static char const rcsid[] = "$Id: untar.c,v 1.34 2007/02/10 14:21:46 njh Exp $";
#if HAVE_CONFIG_H
#include "clamav-config.h"
@ -223,7 +223,7 @@ cli_untar(const char *dir, int desc, unsigned int posix, const struct cl_limits
if(fd < 0) {
cli_errmsg("Can't create temporary file %s: %s\n", fullname, strerror(errno));
cli_dbgmsg("%lu %d %d\n", suffixLen, sizeof(fullname), strlen(fullname));
cli_dbgmsg("%u %d %d\n", suffixLen, sizeof(fullname), strlen(fullname));
return CL_ETMPFILE;
}

Loading…
Cancel
Save