summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2020-03-23 12:36:20 +0000
committerFrediano Ziglio <fziglio@redhat.com>2020-03-23 12:36:59 +0000
commitc8fd498b7fd329cdbd5a74a76cd7f0d56ba55043 (patch)
treed7d491c8a117ea6b3beb5298ee9f8e54c1d7e32e
parentf920c23e2ed3b0e0b773688dd154e5d3ba1cf84b (diff)
display_setting: Remove a warning
Avoids: warning C4267: 'initializing': conversion from 'size_t' to 'DWORD', possible loss of data Value won't never be that huge to cause overflow (we are reading a string in a static buffer, we don't expect an encyclopedia). Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r--vdagent/display_setting.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/vdagent/display_setting.cpp b/vdagent/display_setting.cpp
index b6711d7..1d66048 100644
--- a/vdagent/display_setting.cpp
+++ b/vdagent/display_setting.cpp
@@ -290,7 +290,7 @@ bool DisplaySetting::disable_wallpaper()
static bool RegReadString(HKEY key, const TCHAR *name, TCHAR *buffer, size_t buffer_len)
{
- DWORD value_size = buffer_len * sizeof(buffer[0]);
+ DWORD value_size = (DWORD) (buffer_len * sizeof(buffer[0]));
DWORD value_type;
LONG status;