LibSBML is a native library for reading, writing and manipulating files and data streams containing the Systems Biology Markup Language (SBML). It offers language bindings for C, C++, C#, Java, JavaScript, MATLAB, Perl, PHP, Python, R and Ruby.
This change adds prinf style formatting to Rf_error calls. Without this, compilation fails when -Wformat-security is passed to gcc.
/home/spot/git/libsbml/libsbml-5.20.2/build/src/bindings/r/libsbml_wrap.cpp:330601:17: error: format not a string literal and no format arguments [-Werror=format-security]
330601 | Rf_error(e.what());
| ~~~~~~~~^~~~~~~~~~
I have tested this in Fedora 41 (Rawhide) against gcc-14.0.1 and R 4.4.0 and it resolves the "Fails To Build From Source" issue.
Motivation and Context
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Change in documentation
Checklist:
[x] I have updated all documentation necessary.
[x] I have checked spelling in (new) comments.
Testing
[X] Testing is done automatically and codecov shows test coverage
Description
This change adds prinf style formatting to Rf_error calls. Without this, compilation fails when -Wformat-security is passed to gcc.
I have tested this in Fedora 41 (Rawhide) against gcc-14.0.1 and R 4.4.0 and it resolves the "Fails To Build From Source" issue.
Motivation and Context
Types of changes
Checklist:
Testing