c programming system call

 newPerm = oldPerm & ~0100; 

where oldPerm holds the value of st_mode from the system call stat().
When I try and compile every line where ive attempted to do these operations gives the warning "parameter names without declaration types in function declaration". what could be the problem? the code works fine when i only have lines such as

 newPerm = oldPerm | 0100; 

the error actually occurs when i make the call chmod(file, newPerm); to change file permissions.
another warning also occurs and says " data definition has no type or storage class."

The error is above the code you show. Please post the code for the whole function.

It's very difficult to guess what might be your problem without seeing more of the code. Posting at least the complete function that your chmod() call is in would provide some clue as to what is going on.

The error you are getting seems to be suggesting that the chmod() statement is being interpreted as the declaration of a function, rather than a statement in the body of your programme.