Project

General

Profile

Bug #2176

Updated by Victor Julien almost 7 years ago

Gcc 7.1.1 in Fedora 26 includes new warnings by default. 

 Example: 
 <pre> 
 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); 
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 </pre> 

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

Back