diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-10-08 14:35:55 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-10-08 14:35:55 +0200 |
commit | a9045a7597488129e0cb795c192d1f7aee979c86 (patch) | |
tree | f040e63af35f5b6dd728b8b1a81c827b38d6b53f | |
parent | 1e895f910e409cc7279cd483b21191eed4a7dd34 (diff) | |
download | libtasn1-a9045a7597488129e0cb795c192d1f7aee979c86.tar.gz libtasn1-a9045a7597488129e0cb795c192d1f7aee979c86.tar.bz2 libtasn1-a9045a7597488129e0cb795c192d1f7aee979c86.zip |
Add warning flags mechanism. Fix warnings.
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | configure.in | 6 | ||||
-rw-r--r-- | doc/reference/Makefile.am | 33 | ||||
-rw-r--r-- | examples/Makefile.am | 2 | ||||
-rw-r--r-- | lib/Makefile.am | 2 | ||||
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/asn1Decoding.c | 4 | ||||
-rw-r--r-- | tests/Makefile.am | 2 |
8 files changed, 40 insertions, 15 deletions
diff --git a/Makefile.am b/Makefile.am index 435e896..7b4b7b5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,7 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc +DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc \ + WARN_CFLAGS="-Wall -Werror" EXTRA_DIST = windows/asn1-parser/asn1-parser.vcproj \ windows/asn1-parser/config.h windows/libtasn1.ncb \ diff --git a/configure.in b/configure.in index 900d028..d55654d 100644 --- a/configure.in +++ b/configure.in @@ -128,6 +128,12 @@ elif ! mv fixhdr.tmp $srcdir/lib/libtasn1.h; then AC_MSG_ERROR([[*** Failed to move fixhdr.tmp to lib/libtasn1.h...]]) fi +# Make it possible to pass -Werror when building relevant parts of +# the library. Normally, -Werror breaks when running autoconf tests. +AC_ARG_VAR(WARN_CFLAGS, [Flags to enable compiler warnings]) +AC_MSG_CHECKING([what compiler warning flags we will use]) +AC_MSG_RESULT($WARN_CFLAGS) + AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile lib/Makefile \ gl/Makefile lib/libtasn1.pc lib/libtasn1-config doc/Makefile \ doc/reference/Makefile examples/Makefile]) diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am index 55ef8ab..a607cb0 100644 --- a/doc/reference/Makefile.am +++ b/doc/reference/Makefile.am @@ -24,13 +24,20 @@ DOC_SOURCE_DIR=../../lib SCANGOBJ_OPTIONS= # Extra options to supply to gtkdoc-scan. -# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" +# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" SCAN_OPTIONS= # Extra options to supply to gtkdoc-mkdb. # e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml MKDB_OPTIONS=--sgml-mode --output-format=xml +# Extra options to supply to gtkdoc-mktmpl +# e.g. MKTMPL_OPTIONS=--only-section-tmpl +MKTMPL_OPTIONS= + +# Extra options to supply to gtkdoc-mkhtml +MKHTML_OPTIONS= + # Extra options to supply to gtkdoc-fixref. Not normally needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS= @@ -54,12 +61,17 @@ HTML_IMAGES= # e.g. content_files=running.sgml building.sgml changes-2.0.sgml content_files= +# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded +# These files must be listed here *and* in content_files +# e.g. expand_content_files=running.sgml +expand_content_files= + # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. -# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) +# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) -INCLUDES= +GTKDOC_CFLAGS= GTKDOC_LIBS= # This includes the standard gtk-doc make rules, copied by gtkdocize. @@ -67,10 +79,13 @@ include $(top_srcdir)/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in -EXTRA_DIST += +EXTRA_DIST += + +# Files not to distribute +# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types +# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt +#DISTCLEANFILES += + +# Comment this out if you want your docs-status tested during 'make check' +#TESTS = $(GTKDOC_CHECK) -# Files to remove for "make distclean". -# Only needed if you let the makefile create some files that are typically -# stored in CVS, such as $(DOC_MODULES).types. -# e.g. DISTCLEANFILES = libidn.types -DISTCLEANFILES = libtasn1.types diff --git a/examples/Makefile.am b/examples/Makefile.am index 169a4ef..ea9a040 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_builddir)/gl +AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_builddir)/gl EXTRA_DIST = asn1Coding_test.asn asn1Coding_test.asg diff --git a/lib/Makefile.am b/lib/Makefile.am index d3f5e77..7b6e9d7 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -16,6 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +AM_CFLAGS = $(WARN_CFLAGS) + include_HEADERS = libtasn1.h bin_SCRIPTS = libtasn1-config diff --git a/src/Makefile.am b/src/Makefile.am index 0c849f3..71ffb29 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,7 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_builddir)/gl +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_builddir)/gl LDADD = ../lib/libtasn1.la ../gl/libgnu.la diff --git a/src/asn1Decoding.c b/src/asn1Decoding.c index e4879e2..87ce973 100644 --- a/src/asn1Decoding.c +++ b/src/asn1Decoding.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Free Software Foundation + * Copyright (C) 2006, 2007, 2008 Free Software Foundation * Copyright (C) 2002 Fabio Fiorina * * This file is part of LIBTASN1. @@ -174,7 +174,7 @@ main(int argc,char *argv[]) { size_t tmplen; - der = read_binary_file (inputFileDerName, &tmplen); + der = (unsigned char*) read_binary_file (inputFileDerName, &tmplen); der_len = tmplen; } diff --git a/tests/Makefile.am b/tests/Makefile.am index dc30d80..512e01a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I../gl +AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I../gl AM_LDFLAGS = -no-install LDADD = ../lib/libtasn1.la |