comparison rogue4/misc.c @ 233:0990adf580ee

Declare some function arguments as const. Some functions, mostly in fight.c, declared variables as pointers to const char but passed them to functions that took pointers to ordinary char. The strings did not actually get modified, so adding 'const' to the function definitions removed the warnings.
author John "Elwin" Edwards
date Sun, 06 Mar 2016 19:32:47 -0500
parents 1b73a8641b37
children 0250220d8cdd
comparison
equal deleted inserted replaced
229:50b89f165a34 233:0990adf580ee
343 * vowelstr: 343 * vowelstr:
344 * For printfs: if string starts with a vowel, return "n" for an 344 * For printfs: if string starts with a vowel, return "n" for an
345 * "an". 345 * "an".
346 */ 346 */
347 char * 347 char *
348 vowelstr(char *str) 348 vowelstr(const char *str)
349 { 349 {
350 switch (*str) 350 switch (*str)
351 { 351 {
352 case 'a': case 'A': 352 case 'a': case 'A':
353 case 'e': case 'E': 353 case 'e': case 'E':