Skip to content

Commit

Permalink
bcopy.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 e0a2d1c commit 39fd881
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
5 changes: 3 additions & 2 deletions core/src/stored/bcopy.cc
Expand Up @@ -3,7 +3,7 @@
Copyright (C) 2002-2012 Free Software Foundation Europe e.V.
Copyright (C) 2011-2012 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 @@ -360,7 +360,8 @@ static void GetSessionRecord(Device* dev,
SESSION_LABEL* sessrec)
{
const char* rtype;
memset(sessrec, 0, sizeof(SESSION_LABEL));
static const SESSION_LABEL emptySESSION_LABEL{};
*sessrec = emptySESSION_LABEL;
switch (rec->FileIndex) {
case PRE_LABEL:
rtype = _("Fresh Volume Label");
Expand Down
30 changes: 15 additions & 15 deletions core/src/stored/record.h
Expand Up @@ -3,7 +3,7 @@
Copyright (C) 2000-2012 Free Software Foundation Europe e.V.
Copyright (C) 2011-2012 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 @@ -213,13 +213,13 @@ typedef struct Volume_Label VOLUME_LABEL;
struct Session_Label {
char Id[32]{0}; /**< Bareos Immortal ... */

uint32_t VerNum = 0; /**< Label version number */
uint32_t VerNum{0}; /**< Label version number */

uint32_t JobId = 0; /**< Job id */
uint32_t VolumeIndex = 0; /**< Sequence no of volume for this job */
uint32_t JobId{0}; /**< Job id */
uint32_t VolumeIndex{0}; /**< Sequence no of volume for this job */

/* VerNum >= 11 */
btime_t write_btime = 0; /**< Tdate this label written */
btime_t write_btime{0}; /**< Tdate this label written */

/* VerNum < 11 */
float64_t write_date = 0.0; /**< Date this label written */
Expand All @@ -234,17 +234,17 @@ struct Session_Label {
char Job[MAX_NAME_LENGTH]{0}; /**< Unique name of this Job */
char FileSetName[MAX_NAME_LENGTH]{0};
char FileSetMD5[MAX_NAME_LENGTH]{0};
uint32_t JobType = 0;
uint32_t JobLevel = 0;
uint32_t JobType{0};
uint32_t JobLevel{0};
/* The remainder are part of EOS label only */
uint32_t JobFiles = 0;
uint64_t JobBytes = 0;
uint32_t StartBlock = 0;
uint32_t EndBlock = 0;
uint32_t StartFile = 0;
uint32_t EndFile = 0;
uint32_t JobErrors = 0;
uint32_t JobStatus = 0; /**< Job status */
uint32_t JobFiles{0};
uint64_t JobBytes{0};
uint32_t StartBlock{0};
uint32_t EndBlock{0};
uint32_t StartFile{0};
uint32_t EndFile{0};
uint32_t JobErrors{0};
uint32_t JobStatus{0}; /**< Job status */
};
typedef struct Session_Label SESSION_LABEL;

Expand Down

0 comments on commit 39fd881

Please sign in to comment.