Created
April 2, 2014 15:35
-
-
Save stefan991/9936549 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef unsigned char char_u; | |
void some_function(char *argument) | |
{ | |
return; | |
} | |
int main() | |
{ | |
char_u *test = (char_u *)"example"; | |
some_function(test); | |
return 0; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stefan at air in ~/Desktop | |
% clang char_cast.c | |
char_cast.c:12:17: warning: passing 'char_u *' (aka 'unsigned char *') to | |
parameter of type 'char *' converts between pointers to integer types with | |
different sign [-Wpointer-sign] | |
some_function(test); | |
^~~~ | |
char_cast.c:4:26: note: passing argument to parameter 'argument' here | |
void some_function(char *argument) | |
^ | |
1 warning generated. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment