Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openSUSE 15.4 / g++ v7.5.0 build warnings #144

Closed
d99kris opened this issue Jul 1, 2023 · 0 comments
Closed

openSUSE 15.4 / g++ v7.5.0 build warnings #144

d99kris opened this issue Jul 1, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@d99kris
Copy link
Owner

d99kris commented Jul 1, 2023

Description:
Building rapidcsv on openSUSE 15.4 / g++ v7.5.0 generates warnings like the following:

In file included from /root/rapidcsv/tests/ptest001.cpp:3:0:

/root/rapidcsv/src/rapidcsv.h: In member function ‘size_t rapidcsv::Document::GetDataRowIndex(size_t) const’:
/root/rapidcsv/src/rapidcsv.h:1764:24: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result
[-Wsign-conversion]
       return pRowIdx + static_cast<size_t>(mLabelParams.mColumnNameIdx + 1);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/root/rapidcsv/src/rapidcsv.h: In member function ‘size_t rapidcsv::Document::GetDataColumnIndex(size_t) const’:
/root/rapidcsv/src/rapidcsv.h:1769:27: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result
[-Wsign-conversion]
       return pColumnIdx + static_cast<size_t>(mLabelParams.mRowNameIdx + 1);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

While harmless in practise, it would be good to build without warnings.

Thanks to Randall for reporting this issue via email.

How to reproduce it:

zypper install git cmake gcc gcc-c++
git clone https://github.com/d99kris/rapidcsv && cd rapidcsv
./make.sh build

Environment:

  • Version: v8.77
  • OS / distro: openSUSE 15.4
@d99kris d99kris added the bug Something isn't working label Jul 1, 2023
@d99kris d99kris self-assigned this Jul 1, 2023
@d99kris d99kris closed this as completed in 9fcf2c7 Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant