ycphs / openxlsx

openxlsx - a fast way to read and write complex xslx files
https://ycphs.github.io/openxlsx/
Other
220 stars 74 forks source link

replace sprintf with snprintf #392

Closed JanMarvin closed 1 year ago

JanMarvin commented 1 year ago

Should fix these warnings. Though I haven't really checked if they work as intended.

Found the following significant warnings:
  /Users/ripley/R/Library/Rcpp/include/Rcpp/internal/r_coerce.h:255:7: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
  read_workbook.cpp:553:2: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
  read_workbook.cpp:563:4: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
  read_workbook.cpp:623:7: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
  write_data.cpp:198:9: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
codecov-commenter commented 1 year ago

Codecov Report

Merging #392 (a7bf3f9) into development (bb55b4a) will not change coverage. The diff coverage is 75.00%.

@@             Coverage Diff              @@
##           development     #392   +/-   ##
============================================
  Coverage        70.34%   70.34%           
============================================
  Files               34       34           
  Lines             9041     9041           
============================================
  Hits              6360     6360           
  Misses            2681     2681           
Impacted Files Coverage Δ
src/read_workbook.cpp 90.60% <66.66%> (ø)
src/write_data.cpp 63.43% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.