[GRASS5] Oddity: r3.null

I recently added -Werror-implicit-function-declaration to my compiler
flags to identify source that needs 'upgrading' and function
declarations.

While making changes to r3.null (null_main.c), I noticed the following
code:

if (G3d_isNullValueNum (&value, G3D_DOUBLE)) {
    if (modifyNull) {
        value = newNullVal;
    }
} [...]

modifyNull is actually a void function with a number of parameters, so
the truth statement is always true, testing for the existence of the
function?

Can someone direct me as to what the purpose of this is? An
evolutionary relic? Any help is greatly appreciated.

Thanks!

--
Brad Douglas <rez@touchofmadness.com>

Brad Douglas wrote:

I recently added -Werror-implicit-function-declaration to my compiler
flags to identify source that needs 'upgrading' and function
declarations.

While making changes to r3.null (null_main.c), I noticed the following
code:

if (G3d_isNullValueNum (&value, G3D_DOUBLE)) {
    if (modifyNull) {
        value = newNullVal;
    }
} [...]

modifyNull is actually a void function with a number of parameters, so
the truth statement is always true, testing for the existence of the
function?

Can someone direct me as to what the purpose of this is? An
evolutionary relic? Any help is greatly appreciated.

I suspect that it should refer to changeNull instead.

--
Glynn Clements <glynn@gclements.plus.com>