Project

General

Profile

Feature #853705

Avoid sign-compare compiler warning in fc_has_capability()

Added by Marko Lindqvist 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Category:
General
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

With -Wsign-compare enabled we currently get:

../../../src/utility/capability.c: In function ‘fc_has_capability’:
../../../src/utility/capability.c:59:22: error: comparison of integer expressions of different signedness: ‘long int’ and ‘size_t’ {aka ‘const long unsigned int’} [-Werror=sign-compare]
59 | if ((next-capstr cap_len) && strncmp(cap, capstr, cap_len)0) {

History

#2 Updated by Marko Lindqvist 7 months ago

  • Status changed from Resolved to In Progress

Added assert() is overzealous (should be '>=' instead of '>')

#4 Updated by Marko Lindqvist 7 months ago

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

Also available in: Atom PDF