Skip to content

unit/util/string_utils/: Fix compilation on platforms where char is u… #6036

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

Merged
merged 1 commit into from
Apr 15, 2021

Conversation

vmihalko
Copy link
Contributor

…nsigned

Caused following error on ARMv7hl, aarch64, ppc64le, s390x:

FAILED: unit/CMakeFiles/unit.dir/util/string_utils/escape_non_alnum.cpp.o
../unit/util/string_utils/escape_non_alnum.cpp:158:68: error: narrowing conversion of '-128' from 'signed char' to 'char' [-Wnarrowing]
  158 |   CHECK(escape_non_alnum(std::string{static_cast<signed char>(0x80)}) == "_80");
      |
  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

…nsigned

Caused following error on ARMv7hl, aarch64, ppc64le, s390x:

FAILED: unit/CMakeFiles/unit.dir/util/string_utils/escape_non_alnum.cpp.o
../unit/util/string_utils/escape_non_alnum.cpp:158:68: error: narrowing conversion of '-128' from 'signed char' to 'char' [-Wnarrowing]
  158 |   CHECK(escape_non_alnum(std::string{static_cast<signed char>(0x80)}) == "_80");
      |
@codecov
Copy link

codecov bot commented Apr 15, 2021

Codecov Report

Merging #6036 (4b819c2) into develop (1c32785) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6036      +/-   ##
===========================================
- Coverage    74.11%   74.02%   -0.09%     
===========================================
  Files         1444     1444              
  Lines       157389   157401      +12     
===========================================
- Hits        116646   116521     -125     
- Misses       40743    40880     +137     
Impacted Files Coverage Δ
src/goto-instrument/loop_utils.cpp 94.54% <100.00%> (+1.52%) ⬆️
unit/util/string_utils/escape_non_alnum.cpp 100.00% <100.00%> (ø)
src/goto-programs/read_goto_binary.cpp 30.84% <0.00%> (-16.83%) ⬇️
src/ansi-c/c_typecheck_type.cpp 62.96% <0.00%> (-13.43%) ⬇️
src/util/mp_arith.cpp 41.55% <0.00%> (-9.10%) ⬇️
src/util/std_types.cpp 83.95% <0.00%> (-4.94%) ⬇️
src/linking/static_lifetime_init.cpp 95.89% <0.00%> (-2.74%) ⬇️
src/util/json_irep.cpp 92.85% <0.00%> (-1.79%) ⬇️
src/util/unicode.cpp 80.91% <0.00%> (-1.53%) ⬇️
src/util/expr.cpp 74.26% <0.00%> (-1.48%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8cfa6f...4b819c2. Read the comment docs.

@tautschnig tautschnig merged commit 9f060b2 into diffblue:develop Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants