Skip to content

Commit

Permalink
autoprune.cc: fix class-memaccess warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz authored and franku committed Nov 5, 2019
1 parent eb1c2bb commit 4a0e7d0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/src/dird/autoprune.cc
Expand Up @@ -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
Expand Down Expand Up @@ -87,7 +87,6 @@ void PruneVolumes(JobControlRecord* jcr,
{
int i;
int count;
PoolDbRecord spr;
UaContext* ua;
dbid_list ids;
struct del_ctx prune_list;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 4a0e7d0

Please sign in to comment.