From ec75303792bfecfcc921295f0f48517b8dc26d35 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan <nick.corgan@ettus.com> Date: Thu, 16 Jun 2016 08:02:11 -0700 Subject: Fixed minor warnings * Mismatched printf format strings * Number truncation * Unreferenced variables --- host/tests/ranges_c_test.c | 4 ++-- host/tests/string_vector_c_test.c | 4 ++-- host/tests/subdev_spec_c_test.c | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'host/tests') diff --git a/host/tests/ranges_c_test.c b/host/tests/ranges_c_test.c index da9c86a48..2398588a6 100644 --- a/host/tests/ranges_c_test.c +++ b/host/tests/ranges_c_test.c @@ -1,5 +1,5 @@ // -// Copyright 2015 Ettus Research LLC +// Copyright 2015-2016 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -155,7 +155,7 @@ int main(){ if(size != 2){ fprintf(stderr, "%s:%d: Invalid size: %lu vs. 2", __FILE__, __LINE__, - size); + (unsigned long)size); goto free_meta_range1; } diff --git a/host/tests/string_vector_c_test.c b/host/tests/string_vector_c_test.c index fe055fd91..f7f2f7b69 100644 --- a/host/tests/string_vector_c_test.c +++ b/host/tests/string_vector_c_test.c @@ -1,5 +1,5 @@ // -// Copyright 2015 Ettus Research LLC +// Copyright 2015-2016 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -60,7 +60,7 @@ int main(){ if(size != 2){ return_code = EXIT_FAILURE; fprintf(stderr, "%s:%d: Invalid size: %lu vs. 2", - __FILE__, __LINE__,size); + __FILE__, __LINE__, (unsigned long)size); goto free_string_vector; } diff --git a/host/tests/subdev_spec_c_test.c b/host/tests/subdev_spec_c_test.c index 7663ba357..f69b825a8 100644 --- a/host/tests/subdev_spec_c_test.c +++ b/host/tests/subdev_spec_c_test.c @@ -1,5 +1,5 @@ // -// Copyright 2015 Ettus Research LLC +// Copyright 2015-2016 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -71,7 +71,8 @@ int main(){ uhd_subdev_spec_size(subdev_spec2, &size2) ) if(size1 != size2){ - printf("%s:%d: Sizes do not match. %lu vs. %lu\n", __FILE__, __LINE__, size1, size2); + printf("%s:%d: Sizes do not match. %lu vs. %lu\n", __FILE__, __LINE__, + (unsigned long)size1, (unsigned long)size2); return_code = EXIT_FAILURE; goto free_subdev_spec2; } -- cgit v1.2.3