]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
FIX: this should remove some warnings while compiling on linux and when running Travi...
authoriceman1001 <iceman@iuse.se>
Fri, 15 Jan 2016 11:43:29 +0000 (12:43 +0100)
committericeman1001 <iceman@iuse.se>
Fri, 15 Jan 2016 11:43:29 +0000 (12:43 +0100)
some format specifier for uint64_t
and getting the git history in the perl script.

client/cmdhfmfhard.c
client/cmdlfem4x.c
client/fpga_compress.c
tools/mkversion.pl

index 169b40cf74a556ec09b87444ed62d01c6f095ce2..130cf230f629974e8dd0fce4b259331cb3c29254 100644 (file)
@@ -1292,7 +1292,7 @@ static void generate_candidates(uint16_t sum_a0, uint16_t sum_a8)
                        }
                }
        }
-       printf("Number of possible keys with Sum(a0) = %d: %lld (2^%1.1f)\n", sum_a0, maximum_states, log(maximum_states)/log(2.0));
+       printf("Number of possible keys with Sum(a0) = %d: %ll (2^%1.1f)\n", sum_a0, maximum_states, log(maximum_states)/log(2.0));
        
        init_statelist_cache();
        
@@ -1341,7 +1341,7 @@ static void generate_candidates(uint16_t sum_a0, uint16_t sum_a8)
        for (statelist_t *sl = candidates; sl != NULL; sl = sl->next) {
                maximum_states += (uint64_t)sl->len[ODD_STATE] * sl->len[EVEN_STATE];
        }
-       printf("Number of remaining possible keys: %lld (2^%1.1f)\n", maximum_states, log(maximum_states)/log(2.0));
+       printf("Number of remaining possible keys: %ll (2^%1.1f)\n", maximum_states, log(maximum_states)/log(2.0));
        if (write_stats) {
                if (maximum_states != 0) {
                        fprintf(fstats, "%1.1f;", log(maximum_states)/log(2.0));
@@ -1462,10 +1462,10 @@ int mfnestedhard(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBloc
        PrintAndLog("Time for generating key candidates list: %1.0f seconds", (float)(clock() - start_time)/CLOCKS_PER_SEC);
        
        brute_force();
-               free_nonces_memory();
-               free_statelist_cache();
-               free_candidates_memory(candidates);
-               candidates = NULL;
+       free_nonces_memory();
+       free_statelist_cache();
+       free_candidates_memory(candidates);
+       candidates = NULL;
        }
        
        return 0;
index f3c754ff5c3a7128889a24fe360a8625c1ba7373..ebf84950e8548ce2ced8f67c280017e3b3331e5c 100644 (file)
@@ -58,7 +58,8 @@ int CmdEM410xRead(const char *Cmd)
                return 0;
        }
        char id[12] = {0x00};
-       sprintf(id, "%010llx",lo);
+       //sprintf(id, "%010llx",lo);
+        sprintf(id, "%010" PRIu64 ", lo);      
        
        global_em410xId = id;
        return 1;
index 814167ad1e0206da37bf9f91a62cd1e4e9625403..3d5ba7cadb0bdf460622b142579801966f83b7d9 100644 (file)
@@ -87,8 +87,8 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile)
        do {
 
                if (i >= num_infiles * FPGA_CONFIG_SIZE) {
-                       fprintf(stderr, "Input files too big (total > %lu bytes). These are probably not PM3 FPGA config files.\n", num_infiles*FPGA_CONFIG_SIZE);
-               for(uint16_t j = 0; j < num_infiles; j++) {
+                       fprintf(stderr, "Input files too big (total > %d bytes). These are probably not PM3 FPGA config files.\n", num_infiles*FPGA_CONFIG_SIZE);
+                       for(uint16_t j = 0; j < num_infiles; j++) {
                                fclose(infile[j]);
                        }
                        return(EXIT_FAILURE);
@@ -138,7 +138,7 @@ int zlib_compress(FILE *infile[], uint8_t num_infiles, FILE *outfile)
                ret = deflate(&compressed_fpga_stream, Z_FINISH);
        }
        
-       fprintf(stderr, "compressed %lu input bytes to %lu output bytes\n", i, compressed_fpga_stream.total_out);
+       fprintf(stderr, "compressed %lu input bytes to %u output bytes\n", i, compressed_fpga_stream.total_out);
 
        if (ret != Z_STREAM_END) {
                fprintf(stderr, "Error in deflate(): %d %s\n", ret, compressed_fpga_stream.msg);
index e12dd4472c4c6df0ff9a21bece88b037a199a59e..fe6ee0c70f51dc0245815217cfce83acac5d340a 100644 (file)
@@ -5,12 +5,14 @@
 # -- Henryk Plötz <henryk@ploetzli.ch> 2009-09-28
 # Modified april 2014 because of the move to github. 
 # --- Martin Holst Swende <martin@swende.se>
-
+# Modified january 2016 to work with Travis-CI
+# --- iceman <iceman@iuse.se>
 
 # Clear environment locale so that git will not use localized strings
 $ENV{'LC_ALL'} = "C";
 $ENV{'LANG'} = "C";
 
+my $githistory = `git fetch --all`;
 my $gitversion = `git describe --dirty`;
 my $gitbranch = `git rev-parse --abbrev-ref HEAD`;
 my $clean = 2;
Impressum, Datenschutz