mirror of
https://gitlab.com/virt-viewer/virt-viewer.git
synced 2025-03-09 08:58:17 +03:00
Kill automake portability warnings. Use a config.h Cleanup misc build issues. Build with fatal compile warnings
This commit is contained in:
parent
12a72a27d9
commit
0154dca5b9
@ -11,3 +11,12 @@ Makefile\.in$
|
|||||||
^install-sh$
|
^install-sh$
|
||||||
^ltmain.sh$
|
^ltmain.sh$
|
||||||
^missing$
|
^missing$
|
||||||
|
^libtool$
|
||||||
|
^src/\.deps
|
||||||
|
^src/virt-viewer$
|
||||||
|
^src/.*\.o
|
||||||
|
^src/Makefile$
|
||||||
|
^virt-viewer\.spec$
|
||||||
|
^config.h.in$
|
||||||
|
^man/Makefile$
|
||||||
|
^man/virt-viewer\.1$
|
||||||
|
@ -33,7 +33,8 @@ AC_DEFUN([VIRT_VIEWER_COMPILE_WARNINGS],[
|
|||||||
maximum|error)
|
maximum|error)
|
||||||
try_compiler_flags="$try_compiler_flags -Wall -Wmissing-prototypes -std=c99 -Wnested-externs -Wpointer-arith"
|
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 -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
|
if test "$enable_compile_warnings" = "error" ; then
|
||||||
try_compiler_flags="$try_compiler_flags -Werror"
|
try_compiler_flags="$try_compiler_flags -Werror"
|
||||||
fi
|
fi
|
||||||
|
@ -3,14 +3,11 @@
|
|||||||
set -e
|
set -e
|
||||||
set -v
|
set -v
|
||||||
|
|
||||||
# Make things clean.
|
|
||||||
test -f Makefile && make -k distclean || :
|
|
||||||
|
|
||||||
rm -rf build
|
rm -rf build
|
||||||
mkdir build
|
mkdir build
|
||||||
cd 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
|
||||||
make install
|
make install
|
||||||
|
@ -38,6 +38,7 @@ fi
|
|||||||
|
|
||||||
libtoolize --copy --force
|
libtoolize --copy --force
|
||||||
aclocal
|
aclocal
|
||||||
|
autoheader
|
||||||
automake --add-missing
|
automake --add-missing
|
||||||
autoconf
|
autoconf
|
||||||
|
|
||||||
|
11
configure.ac
11
configure.ac
@ -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
|
AC_PROG_CC
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
|
AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions])
|
||||||
|
|
||||||
VIRT_VIEWER_COMPILE_WARNINGS(maximum)
|
VIRT_VIEWER_COMPILE_WARNINGS(maximum)
|
||||||
|
|
||||||
PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.6.0)
|
PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.6.0)
|
||||||
|
@ -28,8 +28,6 @@ virt-viewer-plugin.so: virt-viewer-plugin.la
|
|||||||
install-data-hook:
|
install-data-hook:
|
||||||
rm -f $(plugindir)/virt-viewer-plugin.a $(plugindir)/virt-viewer-plugin.la
|
rm -f $(plugindir)/virt-viewer-plugin.a $(plugindir)/virt-viewer-plugin.la
|
||||||
|
|
||||||
EXTRA_DIST = README
|
|
||||||
|
|
||||||
CLEANFILES = virt-viewer-plugin.so
|
CLEANFILES = virt-viewer-plugin.so
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -76,10 +76,12 @@ Portions created by Adobe Systems Incorporated are Copyright (C) 2007. All Right
|
|||||||
Contributor(s): Adobe Systems Incorporated.
|
Contributor(s): Adobe Systems Incorporated.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
|
|
||||||
#include <npapi.h>
|
#include <npapi.h>
|
||||||
#include <npupp.h>
|
#include <npupp.h>
|
||||||
|
@ -51,6 +51,8 @@
|
|||||||
*----------------------------------------------------------------------
|
*----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#define XP_UNIX 1
|
#define XP_UNIX 1
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <vncdisplay.h>
|
#include <vncdisplay.h>
|
||||||
|
20
src/main.c
20
src/main.c
@ -20,7 +20,7 @@
|
|||||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
#include <config.h>
|
||||||
|
|
||||||
#include <vncdisplay.h>
|
#include <vncdisplay.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
@ -462,15 +462,6 @@ static GtkWidget *viewer_build_menu(VncDisplay *vnc)
|
|||||||
return menubar;
|
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,
|
static GtkWidget *viewer_build_window(VncDisplay *vnc,
|
||||||
GtkWidget *(*get_toplevel)(void *),
|
GtkWidget *(*get_toplevel)(void *),
|
||||||
void *data,
|
void *data,
|
||||||
@ -816,6 +807,15 @@ viewer_start (const char *uri, const char *name,
|
|||||||
#ifndef PLUGIN
|
#ifndef PLUGIN
|
||||||
/* Standalone program. */
|
/* 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)
|
static void viewer_version(FILE *out)
|
||||||
{
|
{
|
||||||
fprintf(out, "%s version %s\n", PACKAGE, VERSION);
|
fprintf(out, "%s version %s\n", PACKAGE, VERSION);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user