So, as a personal preference I would like to get into the habit of using literals and casts to match a variable's type.

The reason is, imagine this code:
Code:
if (l == 25) {
     ...
}
Can you tell the type of the variable? Now, using a literal suffix:
Code:
if (l == 25L) {
     ...
}
It is clear now that it is a long.

More examples:
Code:
switch (f) {
    case 0:
        ...
        break;
            
    default:
        ...
}



switch (f) {
    case 0.0F:
        ...
        break;
            
    default:
        ...
}
Code:
if (ptr == NULL) {
    ...
}

if (ptr == (int *)0) { // Or even (int *)NULL
    ...
}
Code:
if (z > 30) {
    ...
}

if (z > (size_t)30) {
    ...
}
But, I am right now learning how to run child processes using the POSIX functions, and this paragraph caught my attention:
If wait() or waitpid() returns due to the delivery of a signal to the calling process, -1 shall be returned
[...]
Otherwise, (pid_t)-1 shall be returned
Huh? But according to the standard those functions return a pid_t...

Code:
#include <sys/wait.h>

pid_t wait(int *stat_loc);
pid_t waitpid(pid_t pid, int *stat_loc, int options);
So wouldn't returning -1 as an integer be promoted to pid_t, and thus their return can be compared to (pid_t)-1 in any case???

Is there any case I will shoot myself in the foot if I follow this "style"??