diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2020-03-23 12:36:20 +0000 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2020-03-23 12:36:59 +0000 |
commit | c8fd498b7fd329cdbd5a74a76cd7f0d56ba55043 (patch) | |
tree | d7d491c8a117ea6b3beb5298ee9f8e54c1d7e32e | |
parent | f920c23e2ed3b0e0b773688dd154e5d3ba1cf84b (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.cpp | 2 |
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; |