Skip to content

Commit

Permalink
Merge pull request OpenDDS#4714 from jrw972/compiler-warnings
Browse files Browse the repository at this point in the history
Fix compiler warnings
  • Loading branch information
jrw972 authored Jul 1, 2024
2 parents 116a843 + c6a24f6 commit 28acbc2
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 20 deletions.
6 changes: 3 additions & 3 deletions FACE/Fixed.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,14 @@ inline FACE::UnsignedShort Fixed::fixed_scale() const

inline void Fixed::enforce(unsigned int digits, unsigned int scale)
{
impl_ = impl_.truncate(scale);
impl_ = impl_.truncate(static_cast<ACE_CDR::UShort>(scale));
if (impl_.fixed_digits() > digits) {
throw CORBA::DATA_CONVERSION();
}

if (impl_.fixed_scale() < scale) {
const int offset = scale - impl_.fixed_scale();
if (offset + impl_.fixed_digits() > int(digits)) {
const unsigned int offset = scale - impl_.fixed_scale();
if (offset + impl_.fixed_digits() > digits) {
throw CORBA::DATA_CONVERSION();
}

Expand Down
3 changes: 0 additions & 3 deletions dds/DCPS/DataReaderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3406,9 +3406,6 @@ EndHistoricSamplesMissedSweeper::EndHistoricSamplesMissedSweeper(ACE_Reactor* re
, reader_(*reader)
{ }

EndHistoricSamplesMissedSweeper::~EndHistoricSamplesMissedSweeper()
{ }

void EndHistoricSamplesMissedSweeper::schedule_timer(OpenDDS::DCPS::RcHandle<OpenDDS::DCPS::WriterInfo>& info)
{
info->waiting_for_end_historic_samples(true);
Expand Down
4 changes: 0 additions & 4 deletions dds/DCPS/DataReaderImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ class EndHistoricSamplesMissedSweeper : public ReactorInterceptor {
}

private:
~EndHistoricSamplesMissedSweeper();

WeakRcHandle<DataReaderImpl> reader_;
OPENDDS_SET(WriterInfo_rch) info_set_;

Expand Down Expand Up @@ -913,8 +911,6 @@ class OpenDDS_Dcps_Export DataReaderImpl
}

private:
~LivelinessTimer() { }

WeakRcHandle<DataReaderImpl> data_reader_;

/// liveliness timer id; -1 if no timer is set
Expand Down
10 changes: 5 additions & 5 deletions dds/DCPS/JsonValueReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ bool JsonValueReader<InputStream>::read_int32(ACE_CDR::Long& value)
value = int_value_;
return consume(kInt);
case kUint:
value = uint_value_;
value = static_cast<ACE_CDR::Long>(uint_value_);
return consume(kUint);
default:
return false;
Expand All @@ -458,7 +458,7 @@ bool JsonValueReader<InputStream>::read_int64(ACE_CDR::LongLong& value)
value = int64_value_;
return consume(kInt64);
case kUint64:
value = uint64_value_;
value = static_cast<ACE_CDR::LongLong>(uint64_value_);
return consume(kUint64);
case kInt:
value = int_value_;
Expand Down Expand Up @@ -655,7 +655,7 @@ bool JsonValueReader<InputStream>::read_long_enum(ACE_CDR::Long& value, const En
value = int_value_;
return consume(kInt);
case kUint:
value = uint_value_;
value = static_cast<ACE_CDR::Long>(uint_value_);
return consume(kUint);
default:
return false;
Expand All @@ -670,13 +670,13 @@ bool JsonValueReader<InputStream>::read_bitmask(ACE_CDR::ULongLong& value, const
value = string_to_bitmask(string_value_, helper);
return consume(kString);
case kInt:
value = int_value_;
value = static_cast<ACE_CDR::ULongLong>(int_value_);
return consume(kInt);
case kUint:
value = uint_value_;
return consume(kUint);
case kInt64:
value = int64_value_;
value = static_cast<ACE_CDR::ULongLong>(int64_value_);
return consume(kInt64);
case kUint64:
value = uint64_value_;
Expand Down
2 changes: 1 addition & 1 deletion dds/DCPS/RakeResults_T.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ template <class MessageType>
RakeResults<MessageType>::RakeResults(DataReaderImpl* reader,
SampleSeq& received_data,
DDS::SampleInfoSeq& info_seq,
CORBA::Long max_samples,
CORBA::ULong max_samples,
DDS::PresentationQosPolicy presentation,
#ifndef OPENDDS_NO_QUERY_CONDITION
DDS::QueryCondition_ptr cond,
Expand Down
2 changes: 1 addition & 1 deletion dds/DCPS/RakeResults_T.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class RakeResults {
RakeResults(DataReaderImpl* reader,
SampleSeq& received_data,
DDS::SampleInfoSeq& info_seq,
CORBA::Long max_samples,
CORBA::ULong max_samples,
DDS::PresentationQosPolicy presentation,
#ifndef OPENDDS_NO_QUERY_CONDITION
DDS::QueryCondition_ptr cond,
Expand Down
3 changes: 0 additions & 3 deletions dds/DCPS/transport/framework/TransportClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,6 @@ class OpenDDS_Dcps_Export TransportClient
}

private:
~PendingAssocTimer()
{ }

class CommandBase : public Command {
public:
CommandBase(PendingAssocTimer* timer,
Expand Down

0 comments on commit 28acbc2

Please sign in to comment.