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...":https://support.plan.io/news/187

Bug #886330

closed

gcc10 -O3 cvercmp warning

Added by Marko Lindqvist over 2 years ago. Updated over 2 years 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.


Files

Actions #2

Updated by Marko Lindqvist over 2 years ago

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

Also available in: Atom PDF