From 546e87fd392bc9ae82939fc77ed2b89ef04ca432 Mon Sep 17 00:00:00 2001 From: Phenom Date: Sat, 9 May 2020 14:36:06 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20warning:=20=E2=80=98op=E2=80=99=20may=20b?= =?UTF-8?q?e=20used=20uninitialized=20in=20this=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../../../trunk/retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp: In member function ‘void IdDetailsDialog::modifyReputation()’: ../../../trunk/retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp: 327:30: warning: ‘op’ may be used uninitialized in this function [- Wmaybe-uninitialized] 327 | rsReputations->setOwnOpinion(id,op); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ --- retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp b/retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp index a351e8a7c..ea1f0ceeb 100644 --- a/retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp +++ b/retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp @@ -322,13 +322,13 @@ void IdDetailsDialog::modifyReputation() case 2: op = RsOpinion::POSITIVE; break; default: std::cerr << "Wrong value from opinion combobox. Bug??" << std::endl; - break; + return; } rsReputations->setOwnOpinion(id,op); // trigger refresh when finished. // basic / anstype are not needed. - loadIdentity(); + loadIdentity(); return; }