Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
xerus
xerus
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 40
    • Issues 40
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • xerus
  • xerusxerus
  • Issues
  • #261

Closed
Open
Opened Jul 19, 2019 by RoteKekse@RoteKekseMaintainer

New flag in gcc 9.1 -Wsign-compare

The flag throws some warninings. Need to correct the thrown instances.

src/xerus/cholmod_wrapper.cpp:265:14: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
  265 |   REQUIRE(_m < std::numeric_limits<long>::max() && _n < std::numeric_limits<long>::max() && _A.size() < std::numeric_limits<long>::max(),
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/xerus/misc/check.h:56:101: note: in definition of macro ‘XERUS_CHECK’
   56 |  #define XERUS_CHECK(condition, level, message) XERUS_REQUIRE_TEST; if(XERUS_IS_LOGGING(level) && !(condition)) { XERUS_LOG(level, #condition " failed msg: " << message); } else void(0)
      |                                                                                                     ^~~~~~~~~
include/xerus/misc/internal.h:36:19: note: in expansion of macro ‘XERUS_REQUIRE’
   36 | #define REQUIRE   XERUS_REQUIRE
      |                   ^~~~~~~~~~~~~
src/xerus/cholmod_wrapper.cpp:265:3: note: in expansion of macro ‘REQUIRE’
  265 |   REQUIRE(_m < std::numeric_limits<long>::max() && _n < std::numeric_limits<long>::max() && _A.size() < std::numeric_limits<long>::max(),
      |   ^~~~~~~
src/xerus/cholmod_wrapper.cpp:265:55: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
  265 |   REQUIRE(_m < std::numeric_limits<long>::max() && _n < std::numeric_limits<long>::max() && _A.size() < std::numeric_limits<long>::max(),
      |                                                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/xerus/misc/check.h:56:101: note: in definition of macro ‘XERUS_CHECK’
   56 |  #define XERUS_CHECK(condition, level, message) XERUS_REQUIRE_TEST; if(XERUS_IS_LOGGING(level) && !(condition)) { XERUS_LOG(level, #condition " failed msg: " << message); } else void(0)
      |                                                                                                     ^~~~~~~~~
include/xerus/misc/internal.h:36:19: note: in expansion of macro ‘XERUS_REQUIRE’
   36 | #define REQUIRE   XERUS_REQUIRE
      |                   ^~~~~~~~~~~~~
src/xerus/cholmod_wrapper.cpp:265:3: note: in expansion of macro ‘REQUIRE’
  265 |   REQUIRE(_m < std::numeric_limits<long>::max() && _n < std::numeric_limits<long>::max() && _A.size() < std::numeric_limits<long>::max(),
      |   ^~~~~~~
src/xerus/cholmod_wrapper.cpp:265:103: warning: comparison of integer expressions of different signedness: ‘std::map<long unsigned int, double>::size_type’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
  265 |   REQUIRE(_m < std::numeric_limits<long>::max() && _n < std::numeric_limits<long>::max() && _A.size() < std::numeric_limits<long>::max(),
      |                                                                                             ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/xerus/misc/check.h:56:101: note: in definition of macro ‘XERUS_CHECK’
   56 |  #define XERUS_CHECK(condition, level, message) XERUS_REQUIRE_TEST; if(XERUS_IS_LOGGING(level) && !(condition)) { XERUS_LOG(level, #condition " failed msg: " << message); } else void(0)
      |                                                                                                     ^~~~~~~~~
include/xerus/misc/internal.h:36:19: note: in expansion of macro ‘XERUS_REQUIRE’
   36 | #define REQUIRE   XERUS_REQUIRE
      |                   ^~~~~~~~~~~~~
src/xerus/cholmod_wrapper.cpp:265:3: note: in expansion of macro ‘REQUIRE’
  265 |   REQUIRE(_m < std::numeric_limits<long>::max() && _n < std::numeric_limits<long>::max() && _A.size() < std::numeric_limits<long>::max(),
Edited Jul 19, 2019 by RoteKekse
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: xerus/xerus#261