Commit 9d194aa6 authored by Zander's avatar Zander 💥

Resolve various warnings

parent 63414326
......@@ -19,7 +19,7 @@
/* so we get fdopen declared even when compiling with -ansi */
#define _POSIX_C_SOURCE 200809L
#define _BSD_SOURCE 1 /* to get the prototype for fchmod() */
#define _DEFAULT_SOURCE 1 /* to get the prototype for fchmod() */
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
......
......@@ -78,11 +78,10 @@ diaapp_inc = include_directories('.')
diaapp = executable('dia',
dia_sources + [dia_app_icons_h, diamarshal_h, config_h],
dependencies: [libgtk_dep, libxml_dep, libm_dep],
link_with: [libdia],
dependencies: [libgtk_dep, libxml_dep, libm_dep, libdia_dep],
link_args: dia_link_args,
export_dynamic: true, # some plugins require this.
include_directories: [configuration_inc, libdia_inc],
include_directories: [configuration_inc],
gui_app: true,
install: true,
)
......
......@@ -18,7 +18,7 @@
#include <config.h>
#define _BSD_SOURCE 1 /* to get finite */
#define _DEFAULT_SOURCE 1 /* to get finite */
#include <math.h>
#include <stdio.h>
#include <string.h>
......
......@@ -19,7 +19,7 @@
#include <config.h>
#define _BSD_SOURCE 1
#define _DEFAULT_SOURCE 1
#include <math.h>
#include <string.h> /* memcmp() */
......
......@@ -25,7 +25,7 @@
#include "message.h"
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "dia-lib-icons.h"
#include "pixmaps/dia-lib-icons.h"
#define SCALING_CACHE
......
......@@ -1223,7 +1223,7 @@ dia_svg_parse_path(GArray *points, const gchar *path_str, gchar **unparsed,
if (last_type == PATH_CLOSE) {
g_warning("parse_path: argument given for implicite close path");
/* consume one number so we don't fall into an infinite loop */
while (path != '\0' && strchr("0123456789.+-", path[0])) path++;
while (path != NULL && strchr("0123456789.+-", path[0])) path++;
path_chomp(path);
*closed = TRUE;
need_next_element = TRUE;
......
......@@ -78,7 +78,8 @@ _enum_edited (GtkCellRenderer *renderer,
*/
g_object_set_data (G_OBJECT (store), "modified", GINT_TO_POINTER (1));
g_print ("edited: %d - %s\n", new_string);
// FIXME: What should the number here be?
g_print ("edited: %d - %s\n", 42, new_string);
}
GtkCellRenderer *
......
......@@ -98,7 +98,7 @@ dia_context_release (DiaContext *context)
if (context->messages)
message_warning ("%s:\n%s",
context->desc ? context->desc : "<no context>",
context->messages->data);
(char *) context->messages->data);
g_object_unref (G_OBJECT (context));
}
......
......@@ -120,7 +120,7 @@ libdia_deps = [
libdia_inc = include_directories('.')
libdia = library('dia',
libdia_lib = library('dia',
libdia_sources + [diamarshal, dia_lib_icons_h, config_h],
dependencies: libdia_deps,
include_directories: configuration_inc,
......@@ -128,3 +128,7 @@ libdia = library('dia',
vs_module_defs: 'libdia.def',
install: true,
)
libdia_dep = declare_dependency (include_directories: libdia_inc,
link_with: libdia_lib,
dependencies: libdia_deps)
\ No newline at end of file
......@@ -1116,7 +1116,7 @@ persistence_register_boolean(const gchar *role, gboolean defaultvalue)
if (booleanval == NULL) {
booleanval = g_new(gboolean, 1);
*booleanval = defaultvalue;
g_hash_table_insert(persistent_booleans, role, booleanval);
g_hash_table_insert (persistent_booleans, (gpointer) role, booleanval);
}
return *booleanval;
}
......
......@@ -44,7 +44,7 @@
#include "bezier-common.h"
#include "pattern.h"
#include "dia-lib-icons.h"
#include "pixmaps/dia-lib-icons.h"
#define NUM_HANDLES 8
......
......@@ -25,7 +25,7 @@
#include "dia_dirs.h"
#include "diadynamicmenu.h"
#include "diaoptionmenu.h"
#include "dia-lib-icons.h"
#include "pixmaps/dia-lib-icons.h"
#include <stdlib.h>
#include <glib.h>
......
......@@ -22,9 +22,8 @@ subdir('UML')
foreach o : dia_object_desc
library(o.get('name'),
o.get('sources') + [config_h],
dependencies: [libc_dep, libgtk_dep, libxml_dep, libm_dep] + o.get('extra_deps', []),
link_with: libdia,
include_directories: [configuration_inc, libdia_inc],
dependencies: [libc_dep, libgtk_dep, libxml_dep, libm_dep, libdia_dep] + o.get('extra_deps', []),
include_directories: [configuration_inc],
install: true,
install_dir: dialibdir
)
......
......@@ -20,7 +20,7 @@
#include <config.h>
#define _BSD_SOURCE 1 /* to get finite */
#define _DEFAULT_SOURCE 1 /* to get finite */
#include <math.h>
#include <assert.h>
......
......@@ -16,9 +16,9 @@ endif
shared_module(
'layout_filter',
sources + [config_h],
dependencies: deps,
include_directories: [libdia_inc, configuration_inc, diaapp_inc],
link_with: [libdia, diaapp],
dependencies: [deps, libdia_dep],
include_directories: [configuration_inc, diaapp_inc],
link_with: [diaapp],
install: true,
install_dir: dialibdir
)
......@@ -39,9 +39,8 @@ foreach p : install_plugins_desc
library(
p.get('name'),
p.get('sources') + [config_h],
dependencies: [libc_dep, libgtk_dep, libm_dep, libxml_dep] + p.get('extra_deps', []),
include_directories: [libdia_inc, configuration_inc],
link_with: [libdia],
dependencies: [libc_dep, libgtk_dep, libm_dep, libxml_dep, libdia_dep] + p.get('extra_deps', []),
include_directories: [configuration_inc],
install: p.get('install', true),
install_dir: dialibdir
)
......
......@@ -50,9 +50,9 @@ if py_dep.found()
shared_module(
'python_plugin',
sources + [config_h],
dependencies: [libc_dep, libxml_dep, libgtk_dep, py_dep],
include_directories: [libdia_inc, configuration_inc, diaapp_inc],
link_with: [libdia, diaapp],
dependencies: [libc_dep, libxml_dep, libgtk_dep, py_dep, libdia_dep],
include_directories: [configuration_inc, diaapp_inc],
link_with: [diaapp],
install: true,
install_dir: dialibdir
)
......
......@@ -15,9 +15,8 @@ endif
library(
'wmf_filter',
sources,
dependencies: [libc_dep, libgtk_dep, libm_dep, libxml_dep] + deps,
include_directories: [libdia_inc, configuration_inc],
link_with: [libdia],
dependencies: [libc_dep, libgtk_dep, libm_dep, libxml_dep, libdia_dep] + deps,
include_directories: [configuration_inc],
install: libemf_dep.found(),
install_dir: dialibdir
)
......@@ -22,9 +22,8 @@ if libxslt_dep.found()
library(
'xslt_filter',
sources,
dependencies: [libc_dep, libgtk_dep, libm_dep, libxml_dep, libxslt_dep],
include_directories: [libdia_inc, configuration_inc],
link_with: [libdia],
dependencies: [libc_dep, libgtk_dep, libm_dep, libxml_dep, libdia_dep, libxslt_dep],
include_directories: [configuration_inc],
install: true,
install_dir: dialibdir
)
......
......@@ -25,10 +25,9 @@ foreach t : ['boundingbox', 'objects', 'svg', 'sizeof']
executable(
'test-' + t,
['test-' + t + '.c', config_h],
dependencies: [libgtk_dep, libxml_dep, libm_dep],
link_with: [libdia],
dependencies: [libgtk_dep, libxml_dep, libm_dep, libdia_dep],
link_args: dia_link_args,
include_directories: [configuration_inc, libdia_inc],
include_directories: [configuration_inc],
)
]
endforeach
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment