Skip to content

Instantly share code, notes, and snippets.

@jameswritescode
Created October 8, 2014 15:14
Show Gist options
  • Select an option

  • Save jameswritescode/2e6cb96b934800fc21d1 to your computer and use it in GitHub Desktop.

Select an option

Save jameswritescode/2e6cb96b934800fc21d1 to your computer and use it in GitHub Desktop.
james@rorschach  ~  emcc test.c
test.c:16:53: warning: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
Person person = {.name = "James Newton", .age = 21, .colors = {.eyes = "brown", .hair = "brown"}};
^~
test.c:18:79: warning: format specifies type 'int' but the argument has type 'char *' [-Wformat]
printf("Name: %s, Age: %i, Eye color: %s, Hair color: %s\n", person.name, person.age, person.colors.eyes, person.colors.hair);
~~ ^~~~~~~~~~
%s
2 warnings generated.
james@rorschach  ~  node a.out.js
Name: James Newton, Age: 21, Eye color: brown, Hair color: brown
james@rorschach  ~ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment