Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler error on some Linux installations. #578

Merged
merged 6 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
1. Bugfixes:
* Fix issue causing hanging while testing serial port PTT. (PR #577)
* Fix issue causing improper RX Only reporting when hamlib is disabled. (PR #579)
* Fix compiler error on some Linux installations. (PR #578)

## V1.9.3 October 2023

Expand Down
10 changes: 4 additions & 6 deletions src/audio/PulseAudioEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,8 @@ struct PulseAudioDeviceListTemp

std::vector<AudioDeviceSpecification> PulseAudioEngine::getAudioDeviceList(AudioDirection direction)
{
PulseAudioDeviceListTemp tempObj = {
.thisPtr = this
};
PulseAudioDeviceListTemp tempObj;
tempObj.thisPtr = this;

pa_operation* op = nullptr;

Expand Down Expand Up @@ -231,9 +230,8 @@ struct PaDefaultAudioDeviceTemp

AudioDeviceSpecification PulseAudioEngine::getDefaultAudioDevice(AudioDirection direction)
{
PaDefaultAudioDeviceTemp tempData = {
.mainloop = mainloop_
};
PaDefaultAudioDeviceTemp tempData;
tempData.mainloop = mainloop_;

pa_threaded_mainloop_lock(mainloop_);
auto op = pa_context_get_server_info(context_, [](pa_context *c, const pa_server_info *i, void *userdata) {
Expand Down
16 changes: 10 additions & 6 deletions src/rig_control/HamlibRigController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <functional>
#include <sstream>
#include <algorithm>
#include <cstring>
#include <strings.h>

#include "HamlibRigController.h"

Expand Down Expand Up @@ -64,10 +66,10 @@ HamlibRigController::HamlibRigController(std::string rigName, std::string serial
, multipleVfos_(false)
, pttSet_(false)
, currFreq_(0)
, currMode_(0)
, currMode_(RIG_MODE_NONE)
, restoreOnDisconnect_(restoreFreqModeOnDisconnect)
, origFreq_(0)
, origMode_(0)
, origMode_(RIG_MODE_NONE)
{
// Perform initial load of rig list if this is our first time being created.
InitializeHamlibLibrary();
Expand All @@ -83,9 +85,11 @@ HamlibRigController::HamlibRigController(int rigIndex, std::string serialPort, c
, rig_(nullptr)
, multipleVfos_(false)
, pttSet_(false)
, currFreq_(0)
, currMode_(RIG_MODE_NONE)
, restoreOnDisconnect_(restoreFreqModeOnDisconnect)
, origFreq_(0)
, origMode_(0)
, origMode_(RIG_MODE_NONE)
{
// Perform initial load of rig list if this is our first time being created.
InitializeHamlibLibrary();
Expand Down Expand Up @@ -220,7 +224,7 @@ void HamlibRigController::connectImpl_()

/* Initialise, configure and open. */
origFreq_ = 0;
origMode_ = 0;
origMode_ = RIG_MODE_NONE;

rig_ = rig_init(RigList_[rigIndex]->rig_model);
if (!rig_)
Expand Down Expand Up @@ -327,7 +331,7 @@ void HamlibRigController::disconnectImpl_()
}

origFreq_ = 0;
origMode_ = 0;
origMode_ = RIG_MODE_NONE;

rig_close(rig_);
rig_cleanup(rig_);
Expand Down Expand Up @@ -670,4 +674,4 @@ void HamlibRigController::setModeHelper_(vfo_t currVfo, rmode_t mode)
currMode_ = mode;
requestCurrentFrequencyMode();
}
}
}
Loading