diff options
author | joerg <joerg@pkgsrc.org> | 2013-02-26 23:39:18 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2013-02-26 23:39:18 +0000 |
commit | 5be8e4b8a625ffd4dd6f5d3536212090f6e55cb3 (patch) | |
tree | 11476e064dfa1f07d10510e0db93dd4f705df5e9 /emulators/tme | |
parent | d28b40d02fed3feec749a8102910a7040d7a7b6f (diff) | |
download | pkgsrc-5be8e4b8a625ffd4dd6f5d3536212090f6e55cb3.tar.gz |
Don't use string variables as format strings, especially if they are
from the outside world. Make two clang warnings non-fatal that seem to
be harmless.
Diffstat (limited to 'emulators/tme')
-rw-r--r-- | emulators/tme/Makefile | 9 | ||||
-rw-r--r-- | emulators/tme/distinfo | 9 | ||||
-rw-r--r-- | emulators/tme/patches/patch-aa | 44 | ||||
-rw-r--r-- | emulators/tme/patches/patch-machine_sun2_sun2-mainbus.c | 18 | ||||
-rw-r--r-- | emulators/tme/patches/patch-machine_sun3_sun3-mainbus.c | 18 | ||||
-rw-r--r-- | emulators/tme/patches/patch-machine_sun4_sun4-mainbus.c | 18 | ||||
-rw-r--r-- | emulators/tme/patches/patch-tmesh_tmesh-cmds.c | 31 | ||||
-rw-r--r-- | emulators/tme/patches/patch-tmesh_tmesh-input.y | 13 |
8 files changed, 153 insertions, 7 deletions
diff --git a/emulators/tme/Makefile b/emulators/tme/Makefile index 007166ffff7..16f02adadc5 100644 --- a/emulators/tme/Makefile +++ b/emulators/tme/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.37 2013/02/16 11:21:07 wiz Exp $ +# $NetBSD: Makefile,v 1.38 2013/02/26 23:39:18 joerg Exp $ # DISTNAME= tme-0.8 @@ -22,6 +22,13 @@ CONFIGURE_ARGS+= --disable-debug BUILDLINK_DEPMETHOD.libXt?= build +.include "../../mk/compiler.mk" +.if !empty(PKGSRC_COMPILER:Mclang) +_WRAP_EXTRA_ARGS.CC+= -Wno-error=tautological-compare \ + -Wno-error=sometimes-uninitialized +.endif + + .include "../../devel/libltdl/buildlink3.mk" .include "../../x11/gtk2/buildlink3.mk" .include "../../x11/libSM/buildlink3.mk" diff --git a/emulators/tme/distinfo b/emulators/tme/distinfo index 13f8421369c..8fefedabe8d 100644 --- a/emulators/tme/distinfo +++ b/emulators/tme/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.14 2012/08/29 18:11:28 shattered Exp $ +$NetBSD: distinfo,v 1.15 2013/02/26 23:39:18 joerg Exp $ SHA1 (tme-0.8.tar.gz) = dd4f3421c20ceed548c5328a21dbb26e80f46b9c RMD160 (tme-0.8.tar.gz) = 6bd505c5fa7810d37f436883383c4ba655df2ded Size (tme-0.8.tar.gz) = 2100123 bytes -SHA1 (patch-aa) = e6095f8783c540fa2ae7f5c73b1d30f8f6cd79bc +SHA1 (patch-aa) = 41d42a5bbad9f87bce4bada14ca482f5e8f79d9a SHA1 (patch-ab) = 3825986759da24c628b870a1493e4d37ec37358f SHA1 (patch-ac) = ba581f10ec54b056564a7a84a5833f2d854b55df SHA1 (patch-ad) = e90986262fe9d883ae64fe01dfb4ae07bde6a916 @@ -11,3 +11,8 @@ SHA1 (patch-ae) = cfcea636744991c6eef84ea34ca78d40eb01c086 SHA1 (patch-af) = cd3ffe52d4d75d05394ca74c3f69052bfdc41989 SHA1 (patch-host_bsd_bsd-bpf.c) = 02a94a141da7d1790969deb8624d3a219d3e64ed SHA1 (patch-ic_ieee754_ieee754-misc-auto.sh) = afeb7452ef64bcae71e4dbae21881cff12cb9d4f +SHA1 (patch-machine_sun2_sun2-mainbus.c) = 91b901d37d5f9a72064831d440c4371b81857640 +SHA1 (patch-machine_sun3_sun3-mainbus.c) = bfe56fdee109824ccf8a81760406b6c5d1ab7157 +SHA1 (patch-machine_sun4_sun4-mainbus.c) = 9dda3c5365e608cce2faa180d6a58351c8e58095 +SHA1 (patch-tmesh_tmesh-cmds.c) = 6fffc98ea828e0b58261d810382665ae56da03ff +SHA1 (patch-tmesh_tmesh-input.y) = 745bb1eb860635b89ebf9a0d8560c6c6f49a8c11 diff --git a/emulators/tme/patches/patch-aa b/emulators/tme/patches/patch-aa index 1f61b346d51..16c5abe33a4 100644 --- a/emulators/tme/patches/patch-aa +++ b/emulators/tme/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.5 2010/06/07 13:34:00 tsutsui Exp $ +$NetBSD: patch-aa,v 1.6 2013/02/26 23:39:18 joerg Exp $ ---- libtme/module.c.orig 2010-05-09 14:41:18.000000000 +0900 -+++ libtme/module.c 2010-05-09 15:03:22.000000000 +0900 -@@ -62,11 +62,13 @@ +--- libtme/module.c.orig 2010-06-05 19:04:42.000000000 +0000 ++++ libtme/module.c +@@ -62,11 +62,13 @@ _TME_RCSID("$Id: module.c,v 1.10 2010/06 #endif /* !lt_ptr_t */ #endif /* !lt_ptr */ @@ -16,3 +16,39 @@ $NetBSD: patch-aa,v 1.5 2010/06/07 13:34:00 tsutsui Exp $ /* types: */ struct tme_module { +@@ -248,7 +250,7 @@ tme_module_open(const char *module_fake_ + /* if there were no slashes in the fake module pathname, there is no + top name, which is incorrect: */ + if (first_slash == NULL) { +- tme_output_append_error(_output, module_fake_pathname); ++ tme_output_append_error(_output, "%s", module_fake_pathname); + tme_free(module_raw_name); + return (EINVAL); + } +@@ -258,7 +260,7 @@ tme_module_open(const char *module_fake_ + (first_slash - module_raw_name), + &modules_dir); + if (modules_index == NULL) { +- tme_output_append_error(_output, module_fake_pathname); ++ tme_output_append_error(_output, "%s", module_fake_pathname); + tme_free(module_raw_name); + return (ENOENT); + } +@@ -300,7 +302,7 @@ tme_module_open(const char *module_fake_ + + /* if we didn't find the module in the index: */ + if (tokens_count == 0) { +- tme_output_append_error(_output, module_fake_pathname); ++ tme_output_append_error(_output, "%s", module_fake_pathname); + tme_free(modules_dir); + return (ENOENT); + } +@@ -325,7 +327,7 @@ tme_module_open(const char *module_fake_ + tme_mutex_unlock(&_tme_module_mutex); + tme_free(module_pathname); + if (handle == NULL) { +- tme_output_append_error(_output, module_fake_pathname); ++ tme_output_append_error(_output, "%s", module_fake_pathname); + tme_free_string_array(tokens, -1); + return (ENOENT); + } diff --git a/emulators/tme/patches/patch-machine_sun2_sun2-mainbus.c b/emulators/tme/patches/patch-machine_sun2_sun2-mainbus.c new file mode 100644 index 00000000000..d9cdb887a29 --- /dev/null +++ b/emulators/tme/patches/patch-machine_sun2_sun2-mainbus.c @@ -0,0 +1,18 @@ +$NetBSD: patch-machine_sun2_sun2-mainbus.c,v 1.1 2013/02/26 23:39:18 joerg Exp $ + +--- machine/sun2/sun2-mainbus.c.orig 2013-02-26 21:49:28.000000000 +0000 ++++ machine/sun2/sun2-mainbus.c +@@ -616,11 +616,11 @@ TME_ELEMENT_NEW_DECL(tme_machine_sun2) { + /* try to read in the IDPROM: */ + idprom_fp = fopen(idprom_filename, "r"); + if (idprom_fp == NULL) { +- tme_output_append_error(_output, idprom_filename); ++ tme_output_append_error(_output, "%s", idprom_filename); + return (errno); + } + if (fread(idprom, sizeof(tme_uint8_t), sizeof(idprom), idprom_fp) != sizeof(idprom)) { +- tme_output_append_error(_output, idprom_filename); ++ tme_output_append_error(_output, "%s", idprom_filename); + fclose(idprom_fp); + return (ENOEXEC); + } diff --git a/emulators/tme/patches/patch-machine_sun3_sun3-mainbus.c b/emulators/tme/patches/patch-machine_sun3_sun3-mainbus.c new file mode 100644 index 00000000000..ec6a00095fb --- /dev/null +++ b/emulators/tme/patches/patch-machine_sun3_sun3-mainbus.c @@ -0,0 +1,18 @@ +$NetBSD: patch-machine_sun3_sun3-mainbus.c,v 1.1 2013/02/26 23:39:18 joerg Exp $ + +--- machine/sun3/sun3-mainbus.c.orig 2013-02-26 21:51:46.000000000 +0000 ++++ machine/sun3/sun3-mainbus.c +@@ -710,11 +710,11 @@ TME_ELEMENT_NEW_DECL(tme_machine_sun3) { + /* try to read in the IDPROM: */ + idprom_fp = fopen(idprom_filename, "r"); + if (idprom_fp == NULL) { +- tme_output_append_error(_output, idprom_filename); ++ tme_output_append_error(_output, "%s", idprom_filename); + return (errno); + } + if (fread(idprom, sizeof(tme_uint8_t), sizeof(idprom), idprom_fp) != sizeof(idprom)) { +- tme_output_append_error(_output, idprom_filename); ++ tme_output_append_error(_output, "%s", idprom_filename); + fclose(idprom_fp); + return (ENOEXEC); + } diff --git a/emulators/tme/patches/patch-machine_sun4_sun4-mainbus.c b/emulators/tme/patches/patch-machine_sun4_sun4-mainbus.c new file mode 100644 index 00000000000..79d96bb1fd4 --- /dev/null +++ b/emulators/tme/patches/patch-machine_sun4_sun4-mainbus.c @@ -0,0 +1,18 @@ +$NetBSD: patch-machine_sun4_sun4-mainbus.c,v 1.1 2013/02/26 23:39:18 joerg Exp $ + +--- machine/sun4/sun4-mainbus.c.orig 2013-02-26 21:53:41.000000000 +0000 ++++ machine/sun4/sun4-mainbus.c +@@ -757,11 +757,11 @@ TME_ELEMENT_NEW_DECL(tme_machine_sun4) { + if (idprom_filename != NULL) { + idprom_fp = fopen(idprom_filename, "r"); + if (idprom_fp == NULL) { +- tme_output_append_error(_output, idprom_filename); ++ tme_output_append_error(_output, "%s", idprom_filename); + return (errno); + } + if (fread(idprom, sizeof(tme_uint8_t), sizeof(idprom), idprom_fp) != sizeof(idprom)) { +- tme_output_append_error(_output, idprom_filename); ++ tme_output_append_error(_output, "%s", idprom_filename); + fclose(idprom_fp); + return (ENOEXEC); + } diff --git a/emulators/tme/patches/patch-tmesh_tmesh-cmds.c b/emulators/tme/patches/patch-tmesh_tmesh-cmds.c new file mode 100644 index 00000000000..fd36d24d707 --- /dev/null +++ b/emulators/tme/patches/patch-tmesh_tmesh-cmds.c @@ -0,0 +1,31 @@ +$NetBSD: patch-tmesh_tmesh-cmds.c,v 1.1 2013/02/26 23:39:18 joerg Exp $ + +--- tmesh/tmesh-cmds.c.orig 2013-02-26 21:55:25.000000000 +0000 ++++ tmesh/tmesh-cmds.c +@@ -238,7 +238,7 @@ _tmesh_ls_output_argv(char **_output, st + args += skip; + for (; argc-- > 0; ) { + tme_output_append(_output, " "); +- tme_output_append(_output, *(args++)); ++ tme_output_append(_output, "%s", *(args++)); + } + } + +@@ -524,7 +524,7 @@ _tmesh_command_connect(struct tmesh *tme + + /* this must be an element: */ + if (entry->tmesh_fs_dirent_type != TMESH_FS_DIRENT_ELEMENT) { +- tme_output_append(_output, element1_args[0]); ++ tme_output_append(_output, "%s", element1_args[0]); + return (ENOTSOCK); + } + element1 = entry->tmesh_fs_dirent_value; +@@ -546,7 +546,7 @@ _tmesh_command_connect(struct tmesh *tme + + /* it must be an element: */ + if (entry->tmesh_fs_dirent_type != TMESH_FS_DIRENT_ELEMENT) { +- tme_output_append(_output, value->tmesh_parser_value_pathname0); ++ tme_output_append(_output, "%s", value->tmesh_parser_value_pathname0); + return (ENOTSOCK); + } + element0 = entry->tmesh_fs_dirent_value; diff --git a/emulators/tme/patches/patch-tmesh_tmesh-input.y b/emulators/tme/patches/patch-tmesh_tmesh-input.y new file mode 100644 index 00000000000..57d09ada020 --- /dev/null +++ b/emulators/tme/patches/patch-tmesh_tmesh-input.y @@ -0,0 +1,13 @@ +$NetBSD: patch-tmesh_tmesh-input.y,v 1.1 2013/02/26 23:39:18 joerg Exp $ + +--- tmesh/tmesh-input.y.orig 2013-02-26 21:54:57.000000000 +0000 ++++ tmesh/tmesh-input.y +@@ -301,7 +301,7 @@ _tmesh_parser_argv_arg(struct tmesh_pars + static void + yyerror(char *msg) + { +- tme_output_append(_tmesh_output, msg); ++ tme_output_append(_tmesh_output, "%s", msg); + _tmesh_input->tmesh_scanner.tmesh_scanner_in_args = FALSE; + } + |