Project

General

Profile

Actions

Bug #2176

closed

gcc 7.1.1 'format truncation' compiler warnings

Added by Victor Julien almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Gcc 7.1.1 in Fedora 26 includes new warnings by default.

Example:

log-httplog.c: In function ‘LogHttpLogCustom’:
log-httplog.c:164:39: warning: ‘snprintf’ output truncated before the last format character [-Wformat-truncation=]
                 snprintf(buf, 6, "%06u", (unsigned int) ts->tv_usec);
                                       ^
log-httplog.c:164:17: note: ‘snprintf’ output between 7 and 11 bytes into a destination of size 6
                 snprintf(buf, 6, "%06u", (unsigned int) ts->tv_usec);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Explanation https://bugzilla.redhat.com/show_bug.cgi?id=1431678

Actions #1

Updated by Victor Julien almost 7 years ago

  • Description updated (diff)
Actions #2

Updated by Victor Julien almost 7 years ago

  • Status changed from New to Assigned
  • Assignee set to Victor Julien
  • Target version set to 4.0rc2
Actions #3

Updated by Victor Julien almost 7 years ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF