Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #886330

gcc10 -O3 cvercmp warning

Added by Marko Lindqvist 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
General
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

With gcc10 and -O3:
../../../../src/dependencies/cvercmp/cvercmp.c: In function ‘cvercmp_ver_subtokenize’:
../../../../src/dependencies/cvercmp/cvercmp.c:289:5: error: ‘strncpy’ destination unchanged after copying no bytes [-Werror=stringop-truncation]
289 | strncpy(tokens[i], ver + idx, tokenlen); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../src/dependencies/cvercmp/cvercmp.c:289:5: error: ‘strncpy’ destination unchanged after copying no bytes [-Werror=stringop-truncation]
cc1: all warnings being treated as errors

The error is bogus. In reality tokenlen can never be zero, and I don't get this warning with the upstream project.

History

#2 Updated by Marko Lindqvist 4 months ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF