mirror of
https://github.com/qemu/qemu.git
synced 2026-02-04 02:24:51 +00:00
qga/vss-win32: fix clang warning with C++20
C++20 deprecated such constructs.
../qga/vss-win32/requester.cpp:380:32: error: bitwise operation between different enumeration types ('_VSS_SNAPSHOT_CONTEXT' and '_VSS_VOLUME_SNAPSHOT_ATTRIBUTES') is deprecated [-Werror,-Wdeprecated-enum-enum-conversion]
380 | ctx = VSS_CTX_APP_ROLLBACK | VSS_VOLSNAP_ATTR_TRANSPORTABLE |
This is a false positive, since VSS_CTX_APP_ROLLBACK is not a value
defined in _VSS_VOLUME_SNAPSHOT_ATTRIBUTES enum.
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260124182921.531562-10-pierrick.bouvier@linaro.org
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
This commit is contained in:
@@ -377,8 +377,10 @@ void requester_freeze(int *num_vols, void *mountpoints, ErrorSet *errset)
|
||||
* To prevent the final commit (which requires to write to snapshots),
|
||||
* ATTR_NO_AUTORECOVERY and ATTR_TRANSPORTABLE are specified here.
|
||||
*/
|
||||
ctx = VSS_CTX_APP_ROLLBACK | VSS_VOLSNAP_ATTR_TRANSPORTABLE |
|
||||
VSS_VOLSNAP_ATTR_NO_AUTORECOVERY | VSS_VOLSNAP_ATTR_TXF_RECOVERY;
|
||||
ctx = VSS_CTX_APP_ROLLBACK;
|
||||
ctx |= VSS_VOLSNAP_ATTR_TRANSPORTABLE |
|
||||
VSS_VOLSNAP_ATTR_NO_AUTORECOVERY |
|
||||
VSS_VOLSNAP_ATTR_TXF_RECOVERY;
|
||||
hr = vss_ctx.pVssbc->SetContext(ctx);
|
||||
if (hr == (HRESULT)VSS_E_UNSUPPORTED_CONTEXT) {
|
||||
/* Non-server version of Windows doesn't support ATTR_TRANSPORTABLE */
|
||||
|
||||
Reference in New Issue
Block a user