From 7f3af59d5062356ec5d332e918e224ad5d77638d Mon Sep 17 00:00:00 2001 From: computezrmle <57127745+computezrmle@users.noreply.github.com> Date: Fri, 22 Mar 2024 17:06:30 +0100 Subject: [PATCH] Avoid compiler warning in vboxwrapper.cpp Got a compiler warning in vboxwrapper.cpp vboxwrapper.cpp:684:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector >::size_type' {aka 'long unsigned int'} [-Wsign-compare] 684 | for (int i=0; icopy_to_shared.size(); ++i) { | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~ Declared i as long unsigned int to avoid it. --- samples/vboxwrapper/vboxwrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/vboxwrapper/vboxwrapper.cpp b/samples/vboxwrapper/vboxwrapper.cpp index 681f81320b6..ff55681c02c 100644 --- a/samples/vboxwrapper/vboxwrapper.cpp +++ b/samples/vboxwrapper/vboxwrapper.cpp @@ -681,7 +681,7 @@ int main(int argc, char** argv) { // Copy files to the shared directory // - for (int i=0; icopy_to_shared.size(); ++i) { + for (long unsigned int i=0; icopy_to_shared.size(); ++i) { string source = pVM->copy_to_shared[i]; string destination = string("shared/") + source; if (!boinc_file_exists(destination.c_str())) {