Skip to content

Add workaround for false warnings in renderer configuration

  • Related issues:
  • Requested reviewers:

Reason why this change is needed

Related to #705 (closed)

When compiling the codec in Visual Studio and the configuration file has UNIX-style line endings (e.g. scripts/testv/config_directivity.cfg), jumping back to the previous line in RenderConfigReader_read() using ftell() and fseek(). This is a one line fix which silences the warnings according to https://developercommunity.visualstudio.com/t/fseek-ftell-fail-in-text-mode-for-unix-style-text/425878#T-N431379.

Description of the change

One line on code is added, setting the buffer size for the text file parsing to none. See: https://developercommunity.visualstudio.com/t/fseek-ftell-fail-in-text-mode-for-unix-style-text/425878#T-N431379

setvbuf( pRenderConfigReader->pConfigFile, pConfig_str, _IONBF, sizeof( char ) ); 

Affected operating points

All is bit exact. Eliminates warning messages and potentially unsafe file reading when UNIX-style endings are used with a Visual Studio compiled decoder.

Edited by norvell

Merge request reports

Loading