Commit b3f11378 authored by Peter Pentchev's avatar Peter Pentchev

Fix a signed printf problem warned for by GCC 8.

parent b3751d90
Changelog for libdebug.
0.5.3 not yet ;)
- switch an internal counter from "int" to "unsigned" to
fix a very, very unlikely issue warned for by GCC 8
0.5.2 2017/01/09
- let some build tool names (CC, AR, ARFLAGS, INSTALL) be
......
/*
* Copyright (c) 2002-2004 Abraham vd Merwe <abz@blio.com>
* Copyright (c) 2016 Peter Pentchev <roam@ringlet.net>
* Copyright (c) 2016, 2018 Peter Pentchev <roam@ringlet.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -80,7 +80,7 @@ struct cache
{
int fd; /* file descriptor associated with cached line */
char *cache; /* previous line */
int hits; /* number of consecutive identical lines */
unsigned hits; /* number of consecutive identical lines */
char buf[256]; /* buffer used for saving "Message repeated..." messages */
};
......@@ -367,7 +367,7 @@ static int flush_cache (struct log_private *priv,const char *filename,int line,c
mem_free (buf);
char b[35];
snprintf (b, sizeof(b), "Message repeated %d times\n", priv->cache.hits + 1);
snprintf (b, sizeof(b), "Message repeated %u times\n", priv->cache.hits + 1);
if (savetodisk (priv->cache.fd, b) < 0)
goto error;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment