Skip to content

Unused parameter at SecureTunnel.cpp #773

Closed
@eduelias

Description

@eduelias

Describe the bug

Image

Expected Behavior

To have that parameter used, like this:

Image

Current Behavior

Build error while building aws-iot-device-client.

Reproduction Steps

If you build/run this docker file, it'll show the expected error.

FROM registry.fedoraproject.org/fedora-minimal as base

ARG TARGETPLATFORM=linux/arm64
ARG OPENSSL_VERSION=3.0.8

RUN printf 'install_weak_deps=False\n' >> /etc/dnf/dnf.conf

RUN dnf --assumeyes install \
vim \
tar \
bzip2 \
git \
wget \
curl \
sudo \
make \
gcc \
gcc-c++ \
openssl-devel \
perl-IPC-Cmd \
perl-Pod-Html \
perl-FindBin \
perl-File-Compare \
perl-File-Copy 

# WORKDIR /tmp
RUN curl -sSL https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0.tar.gz -o cmake-3.24.0.tar.gz \
    && tar -zxvf cmake-3.24.0.tar.gz \
    && cd cmake-3.24.0 \
    && ./bootstrap \
    && make \
    && make install

WORKDIR /tmp
RUN wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
    && tar -zxvf openssl-${OPENSSL_VERSION}.tar.gz \
    && cd openssl-${OPENSSL_VERSION} \
    && ./config \
    && make \
    && make install

ADD .github/docker-images/entry-script.sh /home/entry-script
RUN chmod a+x /home/entry-script
ENTRYPOINT ["/home/entry-script"]

FROM base AS deploy
###############################################################################
# Copy and build device client
###############################################################################

COPY . /root/aws-iot-device-client
RUN rm -rf /root/aws-iot-device-client/build
RUN mkdir -p /root/aws-iot-device-client/build

WORKDIR /root/aws-iot-device-client/build
RUN cmake -DEXCLUDE_DD=ON -DCMAKE_CXX_FLAGS="-Wall -Wextra" -DEXCLUDE_ST=ON -DEXCLUDE_FP=ON -DEXCLUDE_PUBSUB=ON -DEXCLUDE_SHADOW=ON -DCMAKE_BUILD_TYPE=Release ..
RUN cmake --build . --target aws-iot-device-client


ENTRYPOINT ["/bin/bash"]

Possible Solution

adding the beneath line to SecureTunnel.cpp:560 fixed the issue:

m_OnStreamStopped = std::move(onStreamStopped);

Additional Information/Context

This is a clear problem with an easy solution. I can file a PR, but I often don't have time to write tests, write docs and the whole due process a library such this one requires. I fixed it locally and I would love to see it fixed for everyone else if possible.

If it's not possible to fix this soon, I'll try to submit a PR fixing it.

Thanks in advance for all the contributions.

SDK version used

current main branch

Environment details (OS name and version, etc.)

Fedora minimal (41).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions