• Filip Roséen's avatar
    input/decoder: return-statement with expression is ill-formed · 8a052fe3
    Filip Roséen authored
    Having written too much C++ in my days, I wrongfully assumed that it
    was legal to have a return-statement with an expression in a function
    returning void, as long as the expression would yield void, in C (as
    it is in C++).
    
    However, according to the C99 ISO Standard (section 6.8.6.4p1) this is
    not the case.
    
    > [ :: 6.8.6.4p1 :: ]
    >
    > A return statement with an expression shall not appear in a function
    > whose return type is void. A return statement without an expression
    > shall only appear in a function whose return type is void.
    Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <remi@remlab.net>
    8a052fe3
decoder.c 65.2 KB