summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-11-02 13:50:46 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-11-02 13:50:46 +0100
commit1a04e4ba650099538e7790c1a2f33fe4267831e4 (patch)
treed843e3906e2ecac1efa2e8d6295868a1d5d694fe /src
parent3dcd1f0c81e1f7f0c4af779b3ce1eaa4f28b9c39 (diff)
downloaddabmux-1a04e4ba650099538e7790c1a2f33fe4267831e4.tar.gz
dabmux-1a04e4ba650099538e7790c1a2f33fe4267831e4.tar.bz2
dabmux-1a04e4ba650099538e7790c1a2f33fe4267831e4.zip
Fix a couple of static check warnings
Diffstat (limited to 'src')
-rw-r--r--src/DabMultiplexer.h4
-rw-r--r--src/MuxElements.h5
-rw-r--r--src/dabOutput/dabOutput.h2
-rw-r--r--src/fig/FIGCarousel.cpp4
-rw-r--r--src/zmq2edi/EDISender.h6
5 files changed, 11 insertions, 10 deletions
diff --git a/src/DabMultiplexer.h b/src/DabMultiplexer.h
index 8a2795b..9d7d19b 100644
--- a/src/DabMultiplexer.h
+++ b/src/DabMultiplexer.h
@@ -83,8 +83,8 @@ class DabMultiplexer : public RemoteControllable {
boost::property_tree::ptree m_pt;
uint32_t m_timestamp = 0;
- std::time_t m_edi_time;
- std::time_t m_edi_time_latched_for_mnsc;
+ std::time_t m_edi_time = 0;
+ std::time_t m_edi_time_latched_for_mnsc = 0;
edi::configuration_t edi_conf;
std::shared_ptr<edi::Sender> edi_sender;
diff --git a/src/MuxElements.h b/src/MuxElements.h
index 100e4d7..90f39a6 100644
--- a/src/MuxElements.h
+++ b/src/MuxElements.h
@@ -393,8 +393,9 @@ struct dabProtection {
class DabSubchannel
{
public:
- DabSubchannel(std::string& uid) :
- uid(uid) { }
+ DabSubchannel(const std::string& uid) :
+ uid(uid),
+ protection() { }
// Calculate subchannel size in number of CU
unsigned short getSizeCu(void) const;
diff --git a/src/dabOutput/dabOutput.h b/src/dabOutput/dabOutput.h
index c7e570b..bfd2594 100644
--- a/src/dabOutput/dabOutput.h
+++ b/src/dabOutput/dabOutput.h
@@ -221,7 +221,7 @@ class DabOutputSimul : public DabOutput
*/
struct zmq_dab_message_t
{
- zmq_dab_message_t()
+ zmq_dab_message_t() : buf()
{
/* set buf lengths to invalid */
buflen[0] = -1;
diff --git a/src/fig/FIGCarousel.cpp b/src/fig/FIGCarousel.cpp
index c791364..f48b62c 100644
--- a/src/fig/FIGCarousel.cpp
+++ b/src/fig/FIGCarousel.cpp
@@ -198,8 +198,8 @@ size_t FIGCarousel::write_fibs(
CRCtmp ^= 0xffff;
buf += 30;
- *(buf++) = ((char *) &CRCtmp)[1];
- *(buf++) = ((char *) &CRCtmp)[0];
+ *(buf++) = (CRCtmp >> 8) & 0x00FF;
+ *(buf++) = CRCtmp & 0x00FF;
}
return 32 * fibCount;
diff --git a/src/zmq2edi/EDISender.h b/src/zmq2edi/EDISender.h
index c953563..9c37e75 100644
--- a/src/zmq2edi/EDISender.h
+++ b/src/zmq2edi/EDISender.h
@@ -40,9 +40,9 @@
// This metadata gets transmitted in the zmq stream
struct metadata_t {
- uint32_t edi_time;
- int16_t utc_offset;
- uint16_t dlfc;
+ uint32_t edi_time = 0;
+ int16_t utc_offset = 0;
+ uint16_t dlfc = 0;
};
struct frame_t {