From e5ac559bcdfb2f6bf3c7f5d04d6afaa73bffd73d Mon Sep 17 00:00:00 2001 From: "R. Bernstein" Date: Sat, 3 Mar 2012 19:41:48 -0500 Subject: [PATCH] Remove a couple of warnings, some of which were removed in the pbatard branch. --- test/driver/bincue.c.in | 63 +++++++++++----------- test/driver/cdrdao.c.in | 116 +++++++++++++++++++++------------------- test/driver/mmc_write.c | 22 +++++--- 3 files changed, 109 insertions(+), 92 deletions(-) diff --git a/test/driver/bincue.c.in b/test/driver/bincue.c.in index 6b7962a4..e9c66e35 100644 --- a/test/driver/bincue.c.in +++ b/test/driver/bincue.c.in @@ -1,5 +1,6 @@ /* -*- C -*- - Copyright (C) 2004, 2006, 2008, 2010, 2011 Rocky Bernstein + Copyright (C) 2004, 2006, 2008, 2010, 2011, 2012 + Rocky Bernstein 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 @@ -19,11 +20,9 @@ Regression test for BIN/CUE device driver: lib/driver/image/bincue.c. */ #ifdef HAVE_CONFIG_H -# include "config.h" -# define __CDIO_CONFIG_H__ 1 +#include "config.h" +#define __CDIO_CONFIG_H__ 1 #endif -#include -#include #ifdef HAVE_STDIO_H #include @@ -37,10 +36,14 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_UNISTD_H +#include /* chdir */ +#endif +#include +#include #include "helper.h" - #ifndef DATA_DIR #define DATA_DIR "@abs_top_srcdir@/test/data" #endif @@ -74,16 +77,16 @@ main(int argc, const char *argv[]) for (i=0; i + Copyright (C) 2004, 2008, 2010, 2011, 2012 + Rocky Bernstein 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 @@ -19,11 +20,9 @@ Regression test for cdio_tocfile. */ #ifdef HAVE_CONFIG_H -# include "config.h" -# define __CDIO_CONFIG_H__ 1 +#include "config.h" +#define __CDIO_CONFIG_H__ 1 #endif -#include -#include #ifdef HAVE_STDIO_H #include @@ -37,7 +36,12 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_UNISTD_H +#include /* chdir */ +#endif +#include +#include #include "helper.h" #ifndef DATA_DIR @@ -89,60 +93,60 @@ main(int argc, const char *argv[]) if (0 == chdir(DATA_DIR)) #endif { - psz_tocfile[sizeof(psz_tocfile)-1] = '\0'; + psz_tocfile[sizeof(psz_tocfile)-1] = '\0'; - cdio_loglevel_default = verbose ? CDIO_LOG_DEBUG : CDIO_LOG_WARN; - for (i=0; i -#include -#include #ifdef HAVE_STDIO_H # include @@ -36,14 +33,27 @@ #ifdef HAVE_STDLIB_H # include #endif +#ifdef HAVE_UNISTD_H +# include +#endif #ifdef HAVE_STRING_H # include #endif #if !defined(HAVE_SLEEP) && defined(_WIN32) # include -# define sleep(s) Sleep(1000*s) #endif +#ifndef HAVE_USLEEP +# error usleep() unimplemented +# if !defined(HAVE_SLEEP) && defined(_WIN32) +# include +# define sleep(s) Sleep(1000*s) +# endif +#endif +#include +#include +#include + #define SKIP_TEST 77 /* gcc may warn if no prototypes are given before function definition */