Skip to content

Instantly share code, notes, and snippets.

@hz9xa
Created August 15, 2013 00:27
Show Gist options
  • Select an option

  • Save hz9xa/6237175 to your computer and use it in GitHub Desktop.

Select an option

Save hz9xa/6237175 to your computer and use it in GitHub Desktop.
warning: deprecated conversion from string constant to ‘char*’ #Cprogramming
warning: deprecated conversion from string constant to ‘char*’
The correct way to fix this is to find every declaration like
char *s = "constant string";
or function call like:
void foo(char *s);
foo("constant string");
and make them const char pointers.
Escape % in printf using %%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment