2013-11-11

warning: passing argument <n> of '<some function>’ with different width due to prototype

You receive warnings, like
warning: passing argument 1 of ‘ptrace’ with different width due to prototype
but you do not have any magic there?

You are using -fshort-enums, and the referenced function accepts a member of an enum there (enum __ptrace_request in this example). By -fshort-enums, all the enums will be short int-s, but the function declaration remains a normal int, as the compiler knows it.

Solution: Remove -fshort-enums from your compiler flags.

No comments :

Post a Comment