mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
Add more C style casts fixes and suppressions
This commit is contained in:
@@ -94,7 +94,7 @@ hs_database_t * loadDatabase(const char *filename, bool verbose) {
|
||||
}
|
||||
size_t len = st.st_size;
|
||||
|
||||
bytes = (char *)mmap(nullptr, len, PROT_READ, MAP_SHARED, fd, 0);
|
||||
bytes = reinterpret_cast<char *>(mmap(nullptr, len, PROT_READ, MAP_SHARED, fd, 0));
|
||||
if (bytes == MAP_FAILED) {
|
||||
cout << "mmap failed" << endl;
|
||||
close(fd);
|
||||
|
@@ -141,7 +141,7 @@ void prettyPrintRange(std::ostream &out, it_t begin, it_t end) {
|
||||
static really_inline
|
||||
char *makeHex(const unsigned char *pat, unsigned patlen) {
|
||||
size_t hexlen = patlen * 4;
|
||||
char *hexbuf = (char *)malloc(hexlen + 1);
|
||||
char *hexbuf = reinterpret_cast<char *>(malloc(hexlen + 1));
|
||||
unsigned i;
|
||||
char *buf;
|
||||
for (i = 0, buf = hexbuf; i < patlen; i++, buf += 4) {
|
||||
|
Reference in New Issue
Block a user