mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-13 13:53:16 +00:00
Log format warnings for strbuf_sprintf
This commit is contained in:
parent
21132466f1
commit
0b40ef655c
2
log.c
2
log.c
@ -726,7 +726,7 @@ int logDump(int level, struct __sourceloc whence, char *name, const unsigned cha
|
||||
logMessage(level, whence, "Dump of %s", name);
|
||||
for(i = 0; i < len; i += 16) {
|
||||
strbuf b = strbuf_local(buf, sizeof buf);
|
||||
strbuf_sprintf(b, " %04x :", i);
|
||||
strbuf_sprintf(b, " %04zx :", i);
|
||||
int j;
|
||||
for (j = 0; j < 16 && i + j < len; j++)
|
||||
strbuf_sprintf(b, " %02x", addr[i + j]);
|
||||
|
@ -168,7 +168,7 @@ int rhizome_fetch_status_html(struct strbuf *b)
|
||||
struct rhizome_fetch_queue *q=&rhizome_fetch_queues[i];
|
||||
strbuf_sprintf(b, "<p>Slot %d, ", i);
|
||||
if (q->active.state!=RHIZOME_FETCH_FREE){
|
||||
strbuf_sprintf(b, "%lld of %lld",
|
||||
strbuf_sprintf(b, "%"PRId64" of %"PRId64,
|
||||
q->active.write_state.file_offset,
|
||||
q->active.manifest->fileLength);
|
||||
}else{
|
||||
|
3
strbuf.h
3
strbuf.h
@ -314,7 +314,8 @@ strbuf strbuf_putc(strbuf sb, char ch);
|
||||
*
|
||||
* @author Andrew Bettison <andrew@servalproject.com>
|
||||
*/
|
||||
int strbuf_sprintf(strbuf sb, const char *fmt, ...);
|
||||
int strbuf_sprintf(strbuf sb, const char *fmt, ...)
|
||||
__attribute__ (( format(printf,2,3) ));
|
||||
int strbuf_vsprintf(strbuf sb, const char *fmt, va_list ap);
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user