mkasa/TGEW — pull request #3 by tomoakin (2014-03-06 02:47:24+00:00)
Title: proper use of const modifier

Got following warning during install. I don't think modern program would change the string pointed to by argv and thus const char**argv would be reasonable.

../atomicappend.c: In function ‘atomic_append’:
../atomicappend.c:50:6: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
s = messages[i];
^
../atomicappend.c: In function ‘main’:
../atomicappend.c:66:2: warning: passing argument 2 of ‘atomic_append’ from incompatible pointer type [enabled by default]
atomic_append(argv[1], argv + 2, argc - 2);
^
../atomicappend.c:7:6: note: expected ‘const char **’ but argument is of type ‘char **’
void atomic_append(const char *file_name, const char **messages, int message_count)
^