Commit 021e46e5 authored by norvell's avatar norvell
Browse files

Add workaround for false warnings in renderer configuration

parent 939c36c8
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -158,6 +158,8 @@
#define OSBA_SPLIT_RENDERING
#endif

#define FIX_705_REND_CONF_FALSE_WARNING                 /* Eri: Bug in MSVC ftell() for UNIX-style line endings trigger false warning messages in renderer configuration. */

/* #################### End BE switches ################################## */


+4 −0
Original line number Diff line number Diff line
@@ -1849,6 +1849,7 @@ ivas_error RenderConfigReader_read(
    uint32_t accDPIdx;
    accDPIdx = 0;


    fseek( pRenderConfigReader->pConfigFile, 0, SEEK_END );
    file_size = ftell( pRenderConfigReader->pConfigFile );
    rewind( pRenderConfigReader->pConfigFile );
@@ -1857,6 +1858,9 @@ ivas_error RenderConfigReader_read(
    pTemp = (char *) calloc( file_size + 1, sizeof( char ) );
    acIdx = 0;
    roomAcHasFgCount = roomAcHasAcEnvCount = FALSE;
#ifdef FIX_705_REND_CONF_FALSE_WARNING
    setvbuf( pRenderConfigReader->pConfigFile, pConfig_str, _IONBF, sizeof( char ) ); /* Work-around for VS bug that gives incorrect ftell for UNIX-style line endings */
#endif

    /* read file line by line */
    while ( fgets( pConfig_str, file_size, pRenderConfigReader->pConfigFile ) != NULL )