From 0975d66d2f06603f5e4016440b333aac88e2958a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 24 Sep 2008 03:22:58 +0000 Subject: Ok, now all the warnings are gone (except for those coming from nids, but that's ok, nids is still in flux, they'll be gone soon). --- src/tests/bzip2.cpp | 8 +++++++- src/tests/formula.cpp | 7 +++++++ src/tests/fstring.cpp | 4 +++- src/tests/itoserver.cpp | 4 ++-- src/tests/logger.cpp | 4 ++-- src/tests/mmparse.cpp | 2 +- src/tests/procs.cpp | 2 +- src/tests/telnetsrv.cpp | 4 ++-- 8 files changed, 25 insertions(+), 10 deletions(-) (limited to 'src/tests') diff --git a/src/tests/bzip2.cpp b/src/tests/bzip2.cpp index 88c5a5d..de7c034 100644 --- a/src/tests/bzip2.cpp +++ b/src/tests/bzip2.cpp @@ -10,10 +10,16 @@ int main( int argc, char *argv[] ) { + if( argc < 3 ) + { + printf("usage: %s \n", argv[0] ); + return -1; + } + char buf[1024]; size_t nRead; - Bu::File f( "test.bz2", "wb" ); + Bu::File f( argv[0], "wb" ); Bu::BZip2 bz2( f ); Bu::File fin( argv[1], "rb"); diff --git a/src/tests/formula.cpp b/src/tests/formula.cpp index 635d73f..429c306 100644 --- a/src/tests/formula.cpp +++ b/src/tests/formula.cpp @@ -9,10 +9,17 @@ int main( int argc, char *argv[] ) { + if( argc < 2 ) + { + printf("usage: %s \n", argv[0] ); + return -1; + } Bu::Formula uForm; Bu::Formula dForm; printf("u: %s = %u\n", argv[1], uForm.run( argv[1] ) ); printf("d: %s = %f\n", argv[1], dForm.run( argv[1] ) ); + + return 0; } diff --git a/src/tests/fstring.cpp b/src/tests/fstring.cpp index 6288ccb..b392eb7 100644 --- a/src/tests/fstring.cpp +++ b/src/tests/fstring.cpp @@ -116,7 +116,7 @@ void doTimings() } #define pem printf("---------\n%08tX: %s\n%08tX: %s\n", (ptrdiff_t)str.getStr(), str.getStr(), (ptrdiff_t)str2.getStr(), str2.getStr() ); -int main( int argc, char *argv[] ) +int main( ) { Bu::FString fs1; for( int j = 0; j < 500000; j++ ) fs1 += (char)('a'+(j%26)); @@ -148,5 +148,7 @@ int main( int argc, char *argv[] ) printf("%d == %d\n", Bu::__calcHashCode( str ), Bu::__calcHashCode( str.getStr() ) ); doTimings(); + + return 0; } diff --git a/src/tests/itoserver.cpp b/src/tests/itoserver.cpp index f4ab726..319b11b 100644 --- a/src/tests/itoserver.cpp +++ b/src/tests/itoserver.cpp @@ -24,7 +24,7 @@ public: TRACE(); } - virtual void onNewConnection( Bu::Client *pClient ) + virtual void onNewConnection( Bu::Client * ) { TRACE(); // Huh... @@ -50,7 +50,7 @@ public: TRACE(); } - virtual void onNewConnection( Bu::Client *pClient, int iPort ) + virtual void onNewConnection( Bu::Client *pClient, int ) { TRACE(); pClient->setProtocol( new ProtocolEcho() ); diff --git a/src/tests/logger.cpp b/src/tests/logger.cpp index 71a1ca2..04cefe8 100644 --- a/src/tests/logger.cpp +++ b/src/tests/logger.cpp @@ -17,7 +17,7 @@ class Thing lineLog( 2, "Want a thing?"); } - void go( int i ) + void go( int ) { lineLog( 1, "GO!!!!"); } @@ -32,6 +32,6 @@ int main() logHexDump( 5, "This is a test of the hex-dump facility", 16, "Random stuff"); Thing gh; - gh.go( 6); + gh.go( 6 ); } diff --git a/src/tests/mmparse.cpp b/src/tests/mmparse.cpp index c60aa1c..9b79e4d 100644 --- a/src/tests/mmparse.cpp +++ b/src/tests/mmparse.cpp @@ -8,7 +8,7 @@ #include "bu/minimacro.h" #include "bu/fstring.h" -int main( int argc, char *argv[] ) +int main() { Bu::MiniMacro mm; diff --git a/src/tests/procs.cpp b/src/tests/procs.cpp index c233040..c4b3ebc 100644 --- a/src/tests/procs.cpp +++ b/src/tests/procs.cpp @@ -2,7 +2,7 @@ #include -int main( int agrc, char *argv[] ) +int main() { //Bu::Process p( argv[1], argv+1 ); Bu::Process p("mplayer", "mplayer", "dvd://", "-framedrop", diff --git a/src/tests/telnetsrv.cpp b/src/tests/telnetsrv.cpp index 9fe2881..f9457e2 100644 --- a/src/tests/telnetsrv.cpp +++ b/src/tests/telnetsrv.cpp @@ -57,7 +57,7 @@ public: { } - virtual void onNewConnection( Bu::Client *pClient, int iPort ) + virtual void onNewConnection( Bu::Client *pClient, int ) { printf("New connection.\n"); @@ -75,7 +75,7 @@ private: }; -int main( int argc, char *argv[] ) +int main() { TelServer ts; -- cgit v1.2.3