Skip to content

-Wsign-compare on 32bit ARM #2568

Description

@jktjkt

I started getting these two warnings:

libyang/src/path.c: In function ‘ly_path_check_predicate’:
libyang/src/path.c:158:58: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
  158 |             if (!strtol(start, &end, 10) || (end - start != exp->tok_len[*tok_idx - 1])) {
      |                                                          ^~
libyang/src/plugins_types/date.c: In function ‘lyplg_type_store_date’:
libyang/src/plugins_types/date.c:150:42: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
  150 |         if (!ptr || (ptr - (char *)value != value_size)) {
      |                                          ^~

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:bugBug description.status:completedFrom the developer perspective, the issue was solved (bug fixed, question answered,...)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions