Skip to content

Commit

Permalink
Pass stricter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
singpolyma committed Jun 17, 2009
1 parent 0a71a5e commit bbc92bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.PHONY: sample_programs clean

CFLAGS=-Wall -Wextra -ansi -pedantic

sample_programs: mnencode mndecode

mnencode: mnencode.o mnemonic.o mn_wordlist.o
Expand Down
6 changes: 3 additions & 3 deletions mnencode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <ctype.h>
#include "mnemonic.h"

int hex2bytes(const char *in, mn_byte *out) {
int inlen = strlen(in);
int hex2bytes(int inlen, const mn_byte *in, mn_byte *out) {
char t[3];
int i, j = 0, k = 0;
if(inlen % 2 != 0) {
Expand Down Expand Up @@ -46,7 +46,7 @@ int main(int argc, char **argv) {
buflen = fread(cbuf, 1, sizeof cbuf, stdin);

if(hex_encoded_input) {
buflen = hex2bytes(cbuf, xbuf);
buflen = hex2bytes(n, cbuf, xbuf);
if(buflen < 0) {
perror("hex2bytes");
return EXIT_FAILURE;
Expand Down

0 comments on commit bbc92bf

Please sign in to comment.