From 4a0e7d051433e2eee0c73f6fa597b5faf153ad34 Mon Sep 17 00:00:00 2001 From: Philipp Storz Date: Mon, 28 Oct 2019 08:43:21 +0100 Subject: [PATCH] autoprune.cc: fix class-memaccess warnings --- core/src/dird/autoprune.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/dird/autoprune.cc b/core/src/dird/autoprune.cc index ff84b6223b2..70d5cb5255c 100644 --- a/core/src/dird/autoprune.cc +++ b/core/src/dird/autoprune.cc @@ -3,7 +3,7 @@ Copyright (C) 2002-2012 Free Software Foundation Europe e.V. Copyright (C) 2011-2016 Planets Communications B.V. - Copyright (C) 2013-2016 Bareos GmbH & Co. KG + Copyright (C) 2013-2019 Bareos GmbH & Co. KG This program is Free Software; you can redistribute it and/or modify it under the terms of version three of the GNU Affero General Public @@ -87,7 +87,6 @@ void PruneVolumes(JobControlRecord* jcr, { int i; int count; - PoolDbRecord spr; UaContext* ua; dbid_list ids; struct del_ctx prune_list; @@ -115,7 +114,7 @@ void PruneVolumes(JobControlRecord* jcr, /* * Get Pool record for Scratch Pool */ - memset(&spr, 0, sizeof(spr)); + PoolDbRecord spr; bstrncpy(spr.Name, "Scratch", sizeof(spr.Name)); if (jcr->db->GetPoolRecord(jcr, &spr)) { edit_int64(spr.PoolId, ed2); @@ -168,7 +167,6 @@ void PruneVolumes(JobControlRecord* jcr, for (i = 0; i < ids.num_ids; i++) { MediaDbRecord lmr; - memset(&lmr, 0, sizeof(lmr)); lmr.MediaId = ids.DBId[i]; Dmsg1(100, "Get record MediaId=%d\n", (int)lmr.MediaId); if (!jcr->db->GetMediaRecord(jcr, &lmr)) {