diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2015-04-20 09:32:12 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2015-04-20 09:32:12 +1200 |
commit | 04385944be3476c3a96df34f168687fad539a94b (patch) | |
tree | 5b0a26990ac91ee3a48459f61335c54ffc9d35b5 | |
parent | Specify .PHONY targets (diff) | |
download | crypt-04385944be3476c3a96df34f168687fad539a94b.tar.gz crypt-04385944be3476c3a96df34f168687fad539a94b.zip |
ICO C90 forbids mixed declarations and code
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | crypt.c | 5 |
2 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,6 @@ .PHONY: all clean install +CFLAGS = -Wall -Wextra -ansi -pedantic LDFLAGS = -lcrypt PREFIX := /usr/local @@ -13,6 +13,9 @@ */ int main (int argc, char **argv) { + /* The hash we will produce, hopefully */ + char *hash = NULL; + /* Assume user doesn't want help */ int help = 0; @@ -44,7 +47,7 @@ int main (int argc, char **argv) } /* All seems well, build the hash and print it */ - char *hash = crypt(argv[1], argv[2]); + hash = crypt(argv[1], argv[2]); fprintf(stdout, "%s\n", hash); exit(EXIT_SUCCESS); } |