Skip to content

Commit

Permalink
Lint paranoia.c now in 0.94-2git
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Mar 26, 2017
1 parent fa0fe9d commit 3e7bcd0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.

define(RELEASE_NUM, 94+1)
define(RELEASE_NUM, 94+2)
define(PARANOIA_VERSION, 10.2)
define(LIBCDIO_PARANOIA_VERSION_STR, $1+0.$2)
define(LIBCDIO_PARANOIA_VERSION_STR, $1+0.$2git)

AC_DEFINE([PACKAGE], [libcdio-paranoia], [cdparanoia using libcdio])

Expand Down Expand Up @@ -154,7 +154,7 @@ AC_SUBST([WC])
dnl headers

AC_HEADER_STDC
AC_CHECK_HEADERS(errno.h fcntl.h glob.h limits.h pwd.h)
AC_CHECK_HEADERS(assert.h errno.h fcntl.h glob.h limits.h pwd.h)
AC_CHECK_HEADERS(stdarg.h stdbool.h stdio.h sys/cdio.h sys/param.h \
sys/time.h sys/timeb.h sys/utsname.h)

Expand Down
6 changes: 3 additions & 3 deletions doc/how-to-make-a-release.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
remove any errors.

- Make sure sources are current and checked in:
[ git pull
git pull

- autogen.sh && make && make check

Expand All @@ -47,9 +47,9 @@
The NEWS file is your friend.

- copy doxygen html to web pages:
cd libcdio-www/doxygen
cd libcdio-www/doxygen/libcdio-paranoia
rm *.html
cp /src/external-vcs/github/libcdio-paranoia/doc/doxygen/html/*.html .
cp /src/external-vcs/github/rocky/libcdio-paranoia/doc/doxygen/html/*.html .
cvs update .

for each "U" html *except libcdio.html* that is put back, remove it
Expand Down
27 changes: 17 additions & 10 deletions example/paranoia.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2005-2006, 2008-2012, 2015
Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011, 2012
Rocky Bernstein <rocky@gnu.org>
This program is free software: you can redistribute it and/or modify
Expand All @@ -22,24 +22,27 @@
/* config.h has to come first else _FILE_OFFSET_BITS are redefined in
say opensolaris. */
#ifdef HAVE_CONFIG_H
#include "config.h"
#define __CDIO_CONFIG_H__ 1
# include "config.h"
# define __CDIO_CONFIG_H__ 1
#endif

#ifdef HAVE_ASSERT_H
# include <assert.h>
#endif
#ifdef HAVE_STDIO_H
#include <stdio.h>
# include <stdio.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
# include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
# include <unistd.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
# ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
# include <sys/stat.h>
#endif
#include <fcntl.h>

Expand Down Expand Up @@ -70,8 +73,10 @@ write_WAV_header(int fd, int32_t i_bytecount){
ssize_t bytes_ret __attribute__((unused));
/* quick and dirty */
bytes_ret = writestr(fd, "RIFF"); /* 0-3 */
assert(bytes_ret > 0);
put_num(i_bytecount+44-8, fd, 4); /* 4-7 */
bytes_ret = writestr(fd, "WAVEfmt "); /* 8-15 */
assert(bytes_ret > 0);
put_num(16, fd, 4); /* 16-19 */
put_num(1, fd, 2); /* 20-21 */
put_num(2, fd, 2); /* 22-23 */
Expand All @@ -80,6 +85,7 @@ write_WAV_header(int fd, int32_t i_bytecount){
put_num(4, fd, 2); /* 32-33 */
put_num(16, fd, 2); /* 34-35 */
bytes_ret = writestr(fd, "data"); /* 36-39 */
assert(bytes_ret > 0);
put_num(i_bytecount, fd, 4); /* 40-43 */
}

Expand Down Expand Up @@ -127,7 +133,7 @@ main(int argc, const char *argv[])
printf("Trouble getting starting LSN\n");
} else {
lsn_t i_cursor;
ssize_t bytes_ret __attribute__((unused));
ssize_t bytes_ret;
track_t i_track = cdda_sector_gettrack(d, i_first_lsn);
lsn_t i_last_lsn = cdda_track_lastsector(d, i_track);
int fd = creat("track1s.wav", 0644);
Expand Down Expand Up @@ -166,6 +172,7 @@ main(int argc, const char *argv[])
break;
}
bytes_ret = write(fd, p_readbuf, CDIO_CD_FRAMESIZE_RAW);
assert(bytes_ret > 0);
}
close(fd);
}
Expand Down

0 comments on commit 3e7bcd0

Please sign in to comment.