aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-05-03 15:59:47 -0700
committerMartin Braun <martin.braun@ettus.com>2017-05-03 15:59:47 -0700
commitc3beb6d1ec2f11ab4d8153b43396d07127cd4f20 (patch)
treecb71d69a3ff09f6c81cf6454d4dd1bb33a2a1382 /host/examples
parent15f0140cd715900b3950b477fb156b0435235c4a (diff)
parente6c8cee6e9e6dbe257bc6a77899306e611d44d71 (diff)
downloaduhd-c3beb6d1ec2f11ab4d8153b43396d07127cd4f20.tar.gz
uhd-c3beb6d1ec2f11ab4d8153b43396d07127cd4f20.tar.bz2
uhd-c3beb6d1ec2f11ab4d8153b43396d07127cd4f20.zip
Merge branch 'maint'
Diffstat (limited to 'host/examples')
-rw-r--r--host/examples/network_relay.cpp4
-rw-r--r--host/examples/tx_samples_c.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/host/examples/network_relay.cpp b/host/examples/network_relay.cpp
index b16bcaaa5..7e354934a 100644
--- a/host/examples/network_relay.cpp
+++ b/host/examples/network_relay.cpp
@@ -100,9 +100,9 @@ public:
std::cout << "spawning relay threads... " << _port << std::endl;
boost::unique_lock<boost::mutex> lock(spawn_mutex); // lock in preparation to wait for threads to spawn
- _thread_group.create_thread(boost::bind(&udp_relay_type::server_thread, this));
+ (void)_thread_group.create_thread(boost::bind(&udp_relay_type::server_thread, this));
wait_for_thread.wait(lock); // wait for thread to spin up
- _thread_group.create_thread(boost::bind(&udp_relay_type::client_thread, this));
+ (void)_thread_group.create_thread(boost::bind(&udp_relay_type::client_thread, this));
wait_for_thread.wait(lock); // wait for thread to spin up
std::cout << " done!" << std::endl << std::endl;
}
diff --git a/host/examples/tx_samples_c.c b/host/examples/tx_samples_c.c
index f04d4b26c..333c7e820 100644
--- a/host/examples/tx_samples_c.c
+++ b/host/examples/tx_samples_c.c
@@ -57,7 +57,7 @@ int main(int argc, char* argv[]){
double freq = 2e9;
double rate = 1e6;
double gain = 0;
- char* device_args = "";
+ char* device_args;
size_t channel = 0;
uint64_t total_num_samps = 0;
bool verbose = false;
@@ -106,6 +106,9 @@ int main(int argc, char* argv[]){
fprintf(stderr, "Unable to set thread priority. Continuing anyway.\n");
}
+ if (device_args == NULL){
+ device_args = "";
+ }
// Create USRP
uhd_usrp_handle usrp;
fprintf(stderr, "Creating USRP with args \"%s\"...\n", device_args);
@@ -246,7 +249,7 @@ int main(int argc, char* argv[]){
uhd_usrp_free(&usrp);
free_option_strings:
- if(strcmp(device_args,"")){
+ if(device_args != NULL){
free(device_args);
}