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."