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

use fgets() results when reading .mesh files, plus language fixes #271

Merged
merged 1 commit into from
May 17, 2024

Conversation

mpotse
Copy link
Contributor

@mpotse mpotse commented May 13, 2024

The .mesh reader uses fgets() to skip comments (until end of line) but did
not check the result, so it would not have noticed anything in the
unlikely case of a comment line longer than MMG5_FILESTR_LGTH = 128 characters.
This commit lets fgets be called repeatedly until EOL or EOF is encountered.
This also avoids a compiler warning on each library.
Using getline() would be easier but that is not standard C.

The .mesh reader uses fgets() to skip comments (until end of line) but did
  not check the result, so it would not have noticed anything in the
  unlikely case of a comment line longer than MMG5_FILESTR_LGTH = 128.
This commit lets fgets be called repeatedly until EOL or EOF is encountered.
This also avoids a compiler warning on each library.
Using getline() would be easier but that is not standard C.
Copy link

codecov bot commented May 13, 2024

Codecov Report

Attention: Patch coverage is 8.33333% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 50.46%. Comparing base (9e391f3) to head (1ec5494).

Files Patch % Lines
src/mmg2d/inout_2d.c 0.00% 4 Missing ⚠️
src/mmg3d/inout_3d.c 0.00% 4 Missing ⚠️
src/mmgs/inout_s.c 25.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #271      +/-   ##
===========================================
- Coverage    50.47%   50.46%   -0.01%     
===========================================
  Files          174      174              
  Lines        47158    47167       +9     
  Branches     10259    10265       +6     
===========================================
  Hits         23802    23802              
- Misses       15633    15641       +8     
- Partials      7723     7724       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Algiane
Copy link
Member

Algiane commented May 14, 2024

Thanks!

@Algiane Algiane merged commit a6a9584 into MmgTools:develop May 17, 2024
25 of 26 checks passed
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