Commit cce42b41 authored by NT-Lab's avatar NT-Lab
Browse files

Fixed some Linux/GCC related errors & warnings

parent 9d13bb5c
......@@ -115,4 +115,4 @@ along with SoftwareDefinedRadio4JUCE. If not, see <http://www.gnu.org/licenses/>
DBG ("Error executing " << juce::String (BOOST_CURRENT_FUNCTION) << ": " << errorDescription (error) << ". Continuing..."); \
returnValue = -1.0; \
} \
return returnValue
\ No newline at end of file
return returnValue
......@@ -1242,7 +1242,7 @@ namespace ntlab
requiredFineGain = (ratioCoarse - nStepsCoarse) * coarseStepWidth;
}
size_t* UHDEngine::ChannelMapping::getStreamArgsChannelList() const {return bufferOrderToHardwareOrder.data(); }
size_t* UHDEngine::ChannelMapping::getStreamArgsChannelList() {return bufferOrderToHardwareOrder.data(); }
juce::ValueTree UHDEngine::ChannelMapping::serializeCurrentSetup (ntlab::UHDEngine::ChannelMapping::Direction direction)
{
......
......@@ -242,6 +242,7 @@ namespace ntlab
static const juce::Identifier propertyHardwareChannel;
enum UHDGainElements : size_t {analog, digital, digitalFine, automatic, count};
/*
friend std::ostream& operator<< (std::ostream& os, UHDEngine::ChannelMapping::UHDGainElements gainElement)
{
switch (gainElement)
......@@ -252,6 +253,7 @@ namespace ntlab
default : return os << static_cast<size_t>(gainElement);
};
}
*/
enum Direction : juce::juce_wchar {rx = 'R', tx = 'T' };
......@@ -283,7 +285,7 @@ namespace ntlab
void digitalGainPartition (const int bufferChannel, const double desiredGain, double& requiredCoarseGain, double& requiredFineGain);
size_t* getStreamArgsChannelList() const;
size_t* getStreamArgsChannelList();
juce::ValueTree serializeCurrentSetup (Direction direction);
static juce::Result deserializeSetup (juce::ValueTree& serializedSetup, UHDEngine& engine);
......
......@@ -27,7 +27,7 @@ namespace ntlab
#elif JUCE_WINDOWS
const juce::String UHDr::uhdLibName ("C:\\Program Files\\UHD\\bin\\uhd.dll");
#else
#error "No uhd library path specified for this operating system"
const juce::String UHDr::uhdLibName ("libuhd.so");
#endif
UHDr::UHDSetter::UHDSetter () : numArguments (0) {}
......
......@@ -10,6 +10,8 @@
#include <Windows.h>
#elif defined(__APPLE__) || defined(__MACOSX)
#include <mach-o/dyld.h>
#else
#include <unistd.h>
#endif
#include "cl2WithVersionChecks.h"
......@@ -128,11 +130,11 @@ namespace ntlab
#else // Linux
char executablePathBuffer[PATH_MAX];
ssizte_t pathLength = readlink ("/proc/self/exe", executablePathBuffer, PATH_MAX - 1);
ssize_t pathLength = readlink ("/proc/self/exe", executablePathBuffer, PATH_MAX - 1);
if (pathLength == -1)
return "";
executablePathBuffer[pathLength] = '/0';
executablePathBuffer[pathLength] = '\0';
pathToCurrentExecutable = executablePathBuffer;
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment