Void or not void for global variables

I am using the following code in order to change a global variable. The compiler gives me an answer saying that the function is void, which makes sense. What I am wondering is, do I need to declare the function as

boolean leftFunc(leftSig) {
    leftSig=!leftSig;
}

instead of

void leftFunc(leftSig) {
    leftSig=!leftSig;
}

in order to change the global variable?

Why pass the global as a parameter (and without a type)? That will lead to confusion with scope.

Changing a global variable is as simple as

void leftFunc()
{
    leftSig = !leftSig;
}

int function() means that the function will return an int byte function() means that the function will return a byte bool function() means that the function will return a bool void function() means that the function will return... nothing

Since the function you wrote doesn't have any return statement it must be void.