Skip to content
Snippets Groups Projects
  • Yang Tse's avatar
    a93695a7
    Compiler warning fix. · a93695a7
    Yang Tse authored
    Assigning the const value zero to a pointer to function
    results in a null pointer value assignment to the function
    pointer.
    
    Assignment of any nonzero value is what should result in a
    implementation compiler dependent result.
    
    Since what we want to do here is the first case, this should
    not trigger compiler warnings related with conversions from
    'pointer to data' to 'pointer to function'.
    
    Our autobuild test suite will judge.
    a93695a7
    History
    Compiler warning fix.
    Yang Tse authored
    Assigning the const value zero to a pointer to function
    results in a null pointer value assignment to the function
    pointer.
    
    Assignment of any nonzero value is what should result in a
    implementation compiler dependent result.
    
    Since what we want to do here is the first case, this should
    not trigger compiler warnings related with conversions from
    'pointer to data' to 'pointer to function'.
    
    Our autobuild test suite will judge.