aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/alloc_mmap/mmap_mem.cpp2
-rw-r--r--modules/es_egd/es_egd.cpp2
-rw-r--r--modules/es_ftw/es_ftw.cpp2
-rw-r--r--modules/es_unix/unix_cmd.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/modules/alloc_mmap/mmap_mem.cpp b/modules/alloc_mmap/mmap_mem.cpp
index c840b2d2b..2ca73b4b7 100644
--- a/modules/alloc_mmap/mmap_mem.cpp
+++ b/modules/alloc_mmap/mmap_mem.cpp
@@ -90,7 +90,7 @@ void* MemoryMapping_Allocator::alloc_block(u32bit n)
void* ptr = mmap(0, n, PROT_READ | PROT_WRITE, MAP_SHARED,
file.get_fd(), 0);
- if(ptr == (void*)MAP_FAILED)
+ if(ptr == static_cast<void*>(MAP_FAILED))
throw MemoryMapping_Failed("Could not map file");
return ptr;
diff --git a/modules/es_egd/es_egd.cpp b/modules/es_egd/es_egd.cpp
index 5078177ab..0ff19a90b 100644
--- a/modules/es_egd/es_egd.cpp
+++ b/modules/es_egd/es_egd.cpp
@@ -61,7 +61,7 @@ u32bit EGD_EntropySource::do_poll(byte output[], u32bit length,
byte buffer[2];
buffer[0] = 1;
- buffer[1] = (byte)length;
+ buffer[1] = static_cast<byte>(length);
if(write(fd, buffer, 2) != 2) { close(fd); return 0; }
if(read(fd, buffer, 1) != 1) { close(fd); return 0; }
diff --git a/modules/es_ftw/es_ftw.cpp b/modules/es_ftw/es_ftw.cpp
index 3253ca27d..412a95f57 100644
--- a/modules/es_ftw/es_ftw.cpp
+++ b/modules/es_ftw/es_ftw.cpp
@@ -97,7 +97,7 @@ void FTW_EntropySource::gather_from_file(const std::string& filename)
return;
SecureVector<byte> read_buf(1024);
- ssize_t got = ::read(fd, (byte*)read_buf.begin(), read_buf.size());
+ ssize_t got = ::read(fd, read_buf.begin(), read_buf.size());
close(fd);
if(got > 0)
diff --git a/modules/es_unix/unix_cmd.cpp b/modules/es_unix/unix_cmd.cpp
index 8fa67fab2..dbefc7e3e 100644
--- a/modules/es_unix/unix_cmd.cpp
+++ b/modules/es_unix/unix_cmd.cpp
@@ -86,7 +86,7 @@ u32bit DataSource_Command::read(byte buf[], u32bit length)
return 0;
}
- return (u32bit)got;
+ return static_cast<u32bit>(got);
}
/*************************************************