diff options
| author | Khem Raj <raj.khem@gmail.com> | 2018-09-06 23:30:16 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2018-09-08 13:32:12 -0700 |
| commit | d960c17f48e881d592269da3c2f3507fbcb345d5 (patch) | |
| tree | f7c880d142fd016ca47b124b62f1e236d1b9b755 /meta-oe/recipes-extended/md5deep/files | |
| parent | 79d66aea14dc3d60457c6dd41ceabd1dfcee3401 (diff) | |
| download | meta-openembedded-d960c17f48e881d592269da3c2f3507fbcb345d5.tar.gz | |
md5deep: Upgrade to latest master
* Add clang fix
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/md5deep/files')
3 files changed, 133 insertions, 53 deletions
diff --git a/meta-oe/recipes-extended/md5deep/files/0001-Fix-errors-found-by-clang.patch b/meta-oe/recipes-extended/md5deep/files/0001-Fix-errors-found-by-clang.patch deleted file mode 100644 index cc7cdc3364..0000000000 --- a/meta-oe/recipes-extended/md5deep/files/0001-Fix-errors-found-by-clang.patch +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | From 6ef69a26126ee4e69a25392fd456b8a66c51dffd Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 15 Nov 2016 02:46:55 +0000 | ||
| 4 | Subject: [PATCH] Fix errors found by clang | ||
| 5 | |||
| 6 | Fixes errors like | ||
| 7 | |||
| 8 | ../../git/src/hash.cpp:282:19: error: ordered comparison between pointer and zero ('const unsigned char *' and 'int') | ||
| 9 | if(fdht->base>0){ | ||
| 10 | ~~~~~~~~~~^~ | ||
| 11 | |||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | src/hash.cpp | 2 +- | ||
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/src/hash.cpp b/src/hash.cpp | ||
| 18 | index 4216157..52f419b 100644 | ||
| 19 | --- a/src/hash.cpp | ||
| 20 | +++ b/src/hash.cpp | ||
| 21 | @@ -279,7 +279,7 @@ void file_data_hasher_t::hash() | ||
| 22 | MAP_FILE| | ||
| 23 | #endif | ||
| 24 | MAP_SHARED,fd,0); | ||
| 25 | - if(fdht->base>0){ | ||
| 26 | + if(fdht->base != (void *) -1){ | ||
| 27 | /* mmap is successful, so set the bounds. | ||
| 28 | * if it is not successful, we default to reading the fd | ||
| 29 | */ | ||
| 30 | -- | ||
| 31 | 1.9.1 | ||
| 32 | |||
diff --git a/meta-oe/recipes-extended/md5deep/files/0001-Fix-literal-and-identifier-spacing-as-dictated-by-C-.patch b/meta-oe/recipes-extended/md5deep/files/0001-Fix-literal-and-identifier-spacing-as-dictated-by-C-.patch new file mode 100644 index 0000000000..69460b314b --- /dev/null +++ b/meta-oe/recipes-extended/md5deep/files/0001-Fix-literal-and-identifier-spacing-as-dictated-by-C-.patch | |||
| @@ -0,0 +1,128 @@ | |||
| 1 | From 7d7b60e38ca701819d4d00b38161faddce01e2ae Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 6 Sep 2018 23:21:22 -0700 | ||
| 4 | Subject: [PATCH] Fix literal and identifier spacing as dictated by C++11 | ||
| 5 | |||
| 6 | Fixes clang error like below | ||
| 7 | |||
| 8 | error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] | ||
| 9 | | status(" Known files not found: %"PRIu64, this->match.unused); | ||
| 10 | |||
| 11 | Upstream-Status: Submitted [https://github.com/jessek/hashdeep/pull/385/commits/18a6b5d57f7a648d2b7dcc6e50ff00a1e4b05fcc] | ||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | src/display.cpp | 16 ++++++++-------- | ||
| 15 | src/files.cpp | 4 ++-- | ||
| 16 | src/hash.cpp | 2 +- | ||
| 17 | src/hashlist.cpp | 4 ++-- | ||
| 18 | src/xml.h | 2 +- | ||
| 19 | 5 files changed, 14 insertions(+), 14 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/src/display.cpp b/src/display.cpp | ||
| 22 | index b23335d..2eddc23 100644 | ||
| 23 | --- a/src/display.cpp | ||
| 24 | +++ b/src/display.cpp | ||
| 25 | @@ -311,7 +311,7 @@ void display::display_realtime_stats(const file_data_hasher_t *fdht, const hash_ | ||
| 26 | |||
| 27 | ss << mb_read << "MB of " << fdht->stat_megs() << "MB done, "; | ||
| 28 | char msg[64]; | ||
| 29 | - snprintf(msg,sizeof(msg),"%02"PRIu64":%02"PRIu64":%02"PRIu64" left", hour, min, seconds); | ||
| 30 | + snprintf(msg,sizeof(msg),"%02" PRIu64 ":%02" PRIu64 ":%02" PRIu64 " left", hour, min, seconds); | ||
| 31 | ss << msg; | ||
| 32 | } | ||
| 33 | ss << "\r"; | ||
| 34 | @@ -424,14 +424,14 @@ void display::display_audit_results() | ||
| 35 | |||
| 36 | if (opt_verbose) { | ||
| 37 | if(opt_verbose >= MORE_VERBOSE){ | ||
| 38 | - status(" Input files examined: %"PRIu64, this->match.total); | ||
| 39 | - status(" Known files expecting: %"PRIu64, this->match.expect); | ||
| 40 | + status(" Input files examined: %" PRIu64, this->match.total); | ||
| 41 | + status(" Known files expecting: %" PRIu64, this->match.expect); | ||
| 42 | } | ||
| 43 | - status(" Files matched: %"PRIu64, this->match.exact); | ||
| 44 | - status("Files partially matched: %"PRIu64, this->match.partial); | ||
| 45 | - status(" Files moved: %"PRIu64, this->match.moved); | ||
| 46 | - status(" New files found: %"PRIu64, this->match.unknown); | ||
| 47 | - status(" Known files not found: %"PRIu64, this->match.unused); | ||
| 48 | + status(" Files matched: %" PRIu64, this->match.exact); | ||
| 49 | + status("Files partially matched: %" PRIu64, this->match.partial); | ||
| 50 | + status(" Files moved: %" PRIu64, this->match.moved); | ||
| 51 | + status(" New files found: %" PRIu64, this->match.unknown); | ||
| 52 | + status(" Known files not found: %" PRIu64, this->match.unused); | ||
| 53 | } | ||
| 54 | } | ||
| 55 | |||
| 56 | diff --git a/src/files.cpp b/src/files.cpp | ||
| 57 | index 89c6984..3dfd363 100644 | ||
| 58 | --- a/src/files.cpp | ||
| 59 | +++ b/src/files.cpp | ||
| 60 | @@ -509,7 +509,7 @@ int state::parse_encase_file(const char *fn, FILE *handle,uint32_t expected_hash | ||
| 61 | |||
| 62 | // Users expect the line numbers to start at one, not zero. | ||
| 63 | if ((!ocb.opt_silent) || (mode_warn_only)) { | ||
| 64 | - ocb.error("%s: No hash found in line %"PRIu32, fn, count + 1); | ||
| 65 | + ocb.error("%s: No hash found in line %" PRIu32, fn, count + 1); | ||
| 66 | ocb.error("%s: %s", fn, strerror(errno)); | ||
| 67 | return status_t::STATUS_USER_ERROR; | ||
| 68 | } | ||
| 69 | @@ -542,7 +542,7 @@ int state::parse_encase_file(const char *fn, FILE *handle,uint32_t expected_hash | ||
| 70 | } | ||
| 71 | |||
| 72 | if (expected_hashes != count){ | ||
| 73 | - ocb.error("%s: Expecting %"PRIu32" hashes, found %"PRIu32"\n", | ||
| 74 | + ocb.error("%s: Expecting %" PRIu32 " hashes, found %" PRIu32 "\n", | ||
| 75 | fn, expected_hashes, count); | ||
| 76 | } | ||
| 77 | return status_t::status_ok; | ||
| 78 | diff --git a/src/hash.cpp b/src/hash.cpp | ||
| 79 | index 52f419b..a4b3128 100644 | ||
| 80 | --- a/src/hash.cpp | ||
| 81 | +++ b/src/hash.cpp | ||
| 82 | @@ -124,7 +124,7 @@ bool file_data_hasher_t::compute_hash(uint64_t request_start,uint64_t request_le | ||
| 83 | |||
| 84 | // If an error occured, display a message and see if we need to quit. | ||
| 85 | if ((current_read_bytes<0) || (this->handle && ferror(this->handle))){ | ||
| 86 | - ocb->error_filename(this->file_name,"error at offset %"PRIu64": %s", | ||
| 87 | + ocb->error_filename(this->file_name,"error at offset %" PRIu64 ": %s", | ||
| 88 | request_start, strerror(errno)); | ||
| 89 | |||
| 90 | if (file_fatal_error()){ | ||
| 91 | diff --git a/src/hashlist.cpp b/src/hashlist.cpp | ||
| 92 | index b5b275f..eb0d45a 100644 | ||
| 93 | --- a/src/hashlist.cpp | ||
| 94 | +++ b/src/hashlist.cpp | ||
| 95 | @@ -342,7 +342,7 @@ hashlist::load_hash_file(display *ocb,const std::string &fn) | ||
| 96 | file_data_t *t = new (std::nothrow) file_data_t(); | ||
| 97 | if (NULL == t) | ||
| 98 | { | ||
| 99 | - ocb->fatal_error("%s: Out of memory in line %"PRIu64, | ||
| 100 | + ocb->fatal_error("%s: Out of memory in line %" PRIu64, | ||
| 101 | fn.c_str(), line_number); | ||
| 102 | } | ||
| 103 | |||
| 104 | @@ -390,7 +390,7 @@ hashlist::load_hash_file(display *ocb,const std::string &fn) | ||
| 105 | if ( !algorithm_t::valid_hash(hash_column[column_number],word)) | ||
| 106 | { | ||
| 107 | if (ocb) | ||
| 108 | - ocb->error("%s: Invalid %s hash in line %"PRIu64, | ||
| 109 | + ocb->error("%s: Invalid %s hash in line %" PRIu64, | ||
| 110 | fn.c_str(), | ||
| 111 | hashes[hash_column[column_number]].name.c_str(), | ||
| 112 | line_number); | ||
| 113 | diff --git a/src/xml.h b/src/xml.h | ||
| 114 | index bfe0c94..017dba7 100644 | ||
| 115 | --- a/src/xml.h | ||
| 116 | +++ b/src/xml.h | ||
| 117 | @@ -100,7 +100,7 @@ public: | ||
| 118 | void xmlout(const std::string &tag,const std::string &value){ xmlout(tag,value,"",true); } | ||
| 119 | void xmlout(const std::string &tag,const int value){ xmlprintf(tag,"","%d",value); } | ||
| 120 | void xmloutl(const std::string &tag,const long value){ xmlprintf(tag,"","%ld",value); } | ||
| 121 | - void xmlout(const std::string &tag,const int64_t value){ xmlprintf(tag,"","%"PRId64,value); } | ||
| 122 | + void xmlout(const std::string &tag,const int64_t value){ xmlprintf(tag,"","%" PRId64,value); } | ||
| 123 | void xmlout(const std::string &tag,const double value){ xmlprintf(tag,"","%f",value); } | ||
| 124 | void xmlout(const std::string &tag,const struct timeval &ts){ | ||
| 125 | xmlprintf(tag,"","%d.%06d",(int)ts.tv_sec, (int)ts.tv_usec); | ||
| 126 | -- | ||
| 127 | 2.18.0 | ||
| 128 | |||
diff --git a/meta-oe/recipes-extended/md5deep/files/wrong-variable-expansion.patch b/meta-oe/recipes-extended/md5deep/files/wrong-variable-expansion.patch index 3a4c4f4c2c..73c6cb126a 100644 --- a/meta-oe/recipes-extended/md5deep/files/wrong-variable-expansion.patch +++ b/meta-oe/recipes-extended/md5deep/files/wrong-variable-expansion.patch | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | --- a/configure.ac 2014-08-22 12:22:54.290884351 +0200 | 1 | Index: git/configure.ac |
| 2 | +++ b/configure.ac 2014-08-22 12:23:15.822306295 +0200 | 2 | =================================================================== |
| 3 | @@ -42,18 +42,6 @@ | 3 | --- git.orig/configure.ac |
| 4 | +++ git/configure.ac | ||
| 5 | @@ -42,18 +42,6 @@ case $host in | ||
| 4 | ;; | 6 | ;; |
| 5 | esac | 7 | esac |
| 6 | 8 | ||
| @@ -19,21 +21,3 @@ | |||
| 19 | # | 21 | # |
| 20 | # | 22 | # |
| 21 | ################################################################ | 23 | ################################################################ |
| 22 | @@ -71,7 +59,7 @@ | ||
| 23 | |||
| 24 | if test $mingw = "no" ; then | ||
| 25 | # add the warnings we don't want to do on mingw | ||
| 26 | - $WARNINGS_TO_TEST="$WARNINGS_TO_TEST -Wall -Wstrict-prototypes -Weffc++" | ||
| 27 | + WARNINGS_TO_TEST="$WARNINGS_TO_TEST -Wall -Wstrict-prototypes -Weffc++" | ||
| 28 | fi | ||
| 29 | |||
| 30 | for option in $WARNINGS_TO_TEST | ||
| 31 | @@ -105,7 +93,7 @@ | ||
| 32 | |||
| 33 | if test $mingw = "no" ; then | ||
| 34 | # add the warnings we don't want to do on mingw | ||
| 35 | - $WARNINGS_TO_TEST="$WARNINGS_TO_TEST -Weffc++" | ||
| 36 | + WARNINGS_TO_TEST="$WARNINGS_TO_TEST -Weffc++" | ||
| 37 | fi | ||
| 38 | |||
| 39 | for option in $WARNINGS_TO_TEST | ||
