Kill automake portability warnings. Use a config.h Cleanup misc build issues. Build with fatal compile warnings

This commit is contained in:
Daniel P. Berrange 2008-03-05 18:24:16 -05:00
parent 12a72a27d9
commit 0154dca5b9
10 changed files with 38 additions and 19 deletions

View File

@ -11,3 +11,12 @@ Makefile\.in$
^install-sh$
^ltmain.sh$
^missing$
^libtool$
^src/\.deps
^src/virt-viewer$
^src/.*\.o
^src/Makefile$
^virt-viewer\.spec$
^config.h.in$
^man/Makefile$
^man/virt-viewer\.1$

View File

@ -33,7 +33,8 @@ AC_DEFUN([VIRT_VIEWER_COMPILE_WARNINGS],[
maximum|error)
try_compiler_flags="$try_compiler_flags -Wall -Wmissing-prototypes -std=c99 -Wnested-externs -Wpointer-arith"
try_compiler_flags="$try_compiler_flags -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return"
try_compiler_flags="$try_compiler_flags -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare"
# Removed -Wstrict-prototypes to avoid GTK bug
try_compiler_flags="$try_compiler_flags -Winline -Wredundant-decls -Wno-sign-compare"
if test "$enable_compile_warnings" = "error" ; then
try_compiler_flags="$try_compiler_flags -Werror"
fi

View File

@ -3,14 +3,11 @@
set -e
set -v
# Make things clean.
test -f Makefile && make -k distclean || :
rm -rf build
mkdir build
cd build
../autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT --enable-fatal-warnings
../autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT --enable-compile-warnings=error --enable-plugin
make
make install

View File

@ -38,6 +38,7 @@ fi
libtoolize --copy --force
aclocal
autoheader
automake --add-missing
autoconf

View File

@ -1,10 +1,17 @@
AC_INIT(virt-viewer.spec.in)
AM_INIT_AUTOMAKE(virt-viewer, 0.0.2)
AC_INIT(virt-viewer, 0.0.2)
AC_CONFIG_SRCDIR(src/main.c)
AM_CONFIG_HEADER(config.h)
dnl Make automake keep quiet about wildcards & other GNUmake-isms
AM_INIT_AUTOMAKE([-Wno-portability])
AC_CANONICAL_HOST
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions])
VIRT_VIEWER_COMPILE_WARNINGS(maximum)
PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.6.0)

View File

@ -28,8 +28,6 @@ virt-viewer-plugin.so: virt-viewer-plugin.la
install-data-hook:
rm -f $(plugindir)/virt-viewer-plugin.a $(plugindir)/virt-viewer-plugin.la
EXTRA_DIST = README
CLEANFILES = virt-viewer-plugin.so
endif

View File

@ -76,10 +76,12 @@ Portions created by Adobe Systems Incorporated are Copyright (C) 2007. All Right
Contributor(s): Adobe Systems Incorporated.
*/
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <npapi.h>
#include <npupp.h>

View File

@ -51,6 +51,8 @@
*----------------------------------------------------------------------
*/
#include <config.h>
#define XP_UNIX 1
#include <stdio.h>

View File

@ -33,6 +33,8 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <vncdisplay.h>

View File

@ -20,7 +20,7 @@
* Author: Daniel P. Berrange <berrange@redhat.com>
*/
#define _GNU_SOURCE
#include <config.h>
#include <vncdisplay.h>
#include <gtk/gtk.h>
@ -462,15 +462,6 @@ static GtkWidget *viewer_build_menu(VncDisplay *vnc)
return menubar;
}
static GtkWidget *viewer_get_toplevel (void *data G_GNUC_UNUSED)
{
GtkWidget *window;
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
return window;
}
static GtkWidget *viewer_build_window(VncDisplay *vnc,
GtkWidget *(*get_toplevel)(void *),
void *data,
@ -816,6 +807,15 @@ viewer_start (const char *uri, const char *name,
#ifndef PLUGIN
/* Standalone program. */
static GtkWidget *viewer_get_toplevel (void *data G_GNUC_UNUSED)
{
GtkWidget *window;
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
return window;
}
static void viewer_version(FILE *out)
{
fprintf(out, "%s version %s\n", PACKAGE, VERSION);