diff options
author | Aaron Stone <aaron@serendipity.cx> | 2013-12-17 12:44:07 -0800 |
---|---|---|
committer | Aaron Stone <aaron@serendipity.cx> | 2013-12-17 13:23:50 -0800 |
commit | 3d9869732d07a606bf4121ead425dea2ea457363 (patch) | |
tree | 9450227e3fba0040a4f3bb3f222df22fec6c18e3 /commandline/examples/micronucleus.c | |
parent | bd22f84cfae23f84a2d2fee343b937794942b0f1 (diff) | |
download | micronucleus-3d9869732d07a606bf4121ead425dea2ea457363.tar.gz micronucleus-3d9869732d07a606bf4121ead425dea2ea457363.tar.bz2 micronucleus-3d9869732d07a606bf4121ead425dea2ea457363.zip |
commandline: resolve three warnings
Diffstat (limited to 'commandline/examples/micronucleus.c')
-rw-r--r-- | commandline/examples/micronucleus.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/commandline/examples/micronucleus.c b/commandline/examples/micronucleus.c index 46fbe67..c96df52 100644 --- a/commandline/examples/micronucleus.c +++ b/commandline/examples/micronucleus.c @@ -25,6 +25,7 @@ #include <errno.h> #include <string.h> #include <stdlib.h> +#include <time.h> #include "micronucleus_lib.h" #include "littleWire_util.h" @@ -41,8 +42,8 @@ unsigned char dataBuffer[65536 + 256]; /* buffer for file data */ /****************************************************************************** * Function prototypes ******************************************************************************/ -static int parseRaw(char *hexfile, char* buffer, int *startAddr, int *endAddr); -static int parseIntelHex(char *hexfile, char* buffer, int *startAddr, int *endAddr); /* taken from bootloadHID example from obdev */ +static int parseRaw(char *hexfile, unsigned char *buffer, int *startAddr, int *endAddr); +static int parseIntelHex(char *hexfile, unsigned char *buffer, int *startAddr, int *endAddr); /* taken from bootloadHID example from obdev */ static int parseUntilColon(FILE *fp); /* taken from bootloadHID example from obdev */ static int parseHex(FILE *fp, int numDigits); /* taken from bootloadHID example from obdev */ static void printProgress(float progress); @@ -350,7 +351,7 @@ static int parseHex(FILE *file_pointer, int num_digits) { /******************************************************************************/ /******************************************************************************/ -static int parseIntelHex(char *hexfile, char* buffer, int *startAddr, int *endAddr) { +static int parseIntelHex(char *hexfile, unsigned char *buffer, int *startAddr, int *endAddr) { int address, base, d, segment, i, lineLen, sum; FILE *input; @@ -396,7 +397,7 @@ static int parseIntelHex(char *hexfile, char* buffer, int *startAddr, int *endAd /******************************************************************************/ /******************************************************************************/ -static int parseRaw(char *filename, char* data_buffer, int *start_address, int *end_address) { +static int parseRaw(char *filename, unsigned char *data_buffer, int *start_address, int *end_address) { FILE *input; input = strcmp(filename, "-") == 0 ? stdin : fopen(filename, "r"); |