[PATCH:libX11 1/4] Stop truncating source to destination length if it is larger.

2013-06-25 Thread Thomas Klausner
It seems useless to do that since the code tests for both source length and destination to be non-zero. This fixes a cut'n'paste problem in xterm where the paste length was limited to 1024 (BUFSIZ) in button.c. --- modules/lc/gen/lcGenConv.c | 28 1 file changed, 28

[PATCH:libX11 2/4] Use newer callback-based API for XIM.

2013-06-25 Thread Thomas Klausner
Let libX11 load and make available the newer (X11R6) callback-based API for XIM (expected by emacs). This patch updates the files to match the other nls/ files. Patch from Ian D. Leroux idler...@fastmail.fm on pkgsrc-us...@netbsd.org following a hint by Nhat Minh LĂȘ nhat.minh...@gmail.com.

[PATCH:libX11 3/4] Check for symbol existence with #ifdef, not #if

2013-06-25 Thread Thomas Klausner
Reviewed-by: Jamey Sharp ja...@minilop.net --- src/XlibInt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/XlibInt.c b/src/XlibInt.c index b06e57b..92a4340 100644 --- a/src/XlibInt.c +++ b/src/XlibInt.c @@ -239,7 +239,7 @@ void _XSeqSyncFunction( static int

[PATCH:libX11 4/4] Fix out-of-range comparison.

2013-06-25 Thread Thomas Klausner
clang complained (correctly): warning: comparison of constant 768614336404564650 with expression of type 'CARD32' (aka 'unsigned int') is always true [-Wtautological-constant-out-of-range-compare] --- src/Font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Font.c

[PATCH:libX11] Fix more out-of-range comparisons.

2013-06-25 Thread Thomas Klausner
--- src/FontNames.c | 2 +- src/GetFPath.c | 2 +- src/ListExt.c | 2 +- src/ModMap.c| 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FontNames.c b/src/FontNames.c index b5bc7b4..7647115 100644 --- a/src/FontNames.c +++ b/src/FontNames.c @@ -66,7 +66,7 @@ int

libXt fixes for compilation with clang-3.4

2013-06-25 Thread Thomas Klausner
This fixes all warnings that clang-3.4 reports, except for Error.c:265:30: warning: format string is not a string literal [-Wformat-nonliteral] (void) fprintf (stderr, buffer, ^~ Error.c:307:40: warning: format string is not a string literal

[PATCH:libXt 1/6] Remove unnecessary clause.

2013-06-25 Thread Thomas Klausner
len is unsigned and can't be smaller than zero. --- src/Alloc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Alloc.c b/src/Alloc.c index c523d81..477dfe0 100644 --- a/src/Alloc.c +++ b/src/Alloc.c @@ -140,9 +140,6 @@ Cardinal XtAsprintf( len = vsnprintf(buf, sizeof(buf), format,

[PATCH:libXt 2/6] Avoid shadowing variables.

2013-06-25 Thread Thomas Klausner
--- src/Composite.c | 10 +- src/Convert.c | 2 +- src/Geometry.c | 8 src/Intrinsic.c | 6 +++--- src/NextEvent.c | 1 - src/Object.c| 16 src/Selection.c | 1 - src/TMaction.c | 10 +- 8 files changed, 26 insertions(+), 28 deletions(-)

[PATCH:libXt 5/6] Silence compiler clang warnings.

2013-06-25 Thread Thomas Klausner
Fixes: warning: cast from function call of type 'char *' to non-matching type 'XtArgVal' (aka 'long') [-Wbad-function-cast] --- src/Resources.c | 2 +- src/Varargs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Resources.c b/src/Resources.c index 1d2871c..657c55d

[PATCH:libXt 3/6] Mark non-returning function with appropriate attribute.

2013-06-25 Thread Thomas Klausner
--- src/Error.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Error.c b/src/Error.c index fc9b11a..334e001 100644 --- a/src/Error.c +++ b/src/Error.c @@ -75,6 +75,13 @@ in this Software without prior written authorization from The Open Group. #include stdio.h

[PATCH:libXt 6/6] Ignore test-driver from automake-1.13.

2013-06-25 Thread Thomas Klausner
--- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 84e5899..1b9e5df 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ mkinstalldirs py-compile stamp-h? symlink-tree +test-driver texinfo.tex ylwrap -- 1.8.3.1

[PATCH:libXt 4/6] Fix char vs. unsigned char warnings.

2013-06-25 Thread Thomas Klausner
--- src/ResConfig.c | 4 ++-- src/TMparse.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ResConfig.c b/src/ResConfig.c index 152d9cf..5a7f6d2 100644 --- a/src/ResConfig.c +++ b/src/ResConfig.c @@ -892,7 +892,7 @@ _XtResourceConfigurationEH ( int

Re: [PATCH:libXt 1/6] Remove unnecessary clause.

2013-06-25 Thread Mark Kettenis
From: Thomas Klausner w...@netbsd.org Date: Tue, 25 Jun 2013 23:02:45 +0200 len is unsigned and can't be smaller than zero. But vsnprintf(3) returns a signed integer, which can be -1. --- src/Alloc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Alloc.c b/src/Alloc.c

Re: [PATCH:libXt 1/6] Remove unnecessary clause.

2013-06-25 Thread Alan Coopersmith
On 06/25/13 02:13 PM, Mark Kettenis wrote: From: Thomas Klausner w...@netbsd.org Date: Tue, 25 Jun 2013 23:02:45 +0200 len is unsigned and can't be smaller than zero. But vsnprintf(3) returns a signed integer, which can be -1. Right, so I guess we either make len be signed, or change the if

Re: [PATCH:libXt 1/6] Remove unnecessary clause.

2013-06-25 Thread Thomas Klausner
On Tue, Jun 25, 2013 at 11:13:54PM +0200, Mark Kettenis wrote: From: Thomas Klausner w...@netbsd.org Date: Tue, 25 Jun 2013 23:02:45 +0200 len is unsigned and can't be smaller than zero. But vsnprintf(3) returns a signed integer, which can be -1. But you can't put that in an unsigned

Re: [PATCH:libXt 3/6] Mark non-returning function with appropriate attribute.

2013-06-25 Thread Alan Coopersmith
On 06/25/13 02:02 PM, Thomas Klausner wrote: --- src/Error.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Error.c b/src/Error.c index fc9b11a..334e001 100644 --- a/src/Error.c +++ b/src/Error.c @@ -75,6 +75,13 @@ in this Software without prior written

Re: [PATCH:libXt 1/6] Remove unnecessary clause.

2013-06-25 Thread Thomas Klausner
On Tue, Jun 25, 2013 at 02:18:53PM -0700, Alan Coopersmith wrote: On 06/25/13 02:13 PM, Mark Kettenis wrote: From: Thomas Klausner w...@netbsd.org Date: Tue, 25 Jun 2013 23:02:45 +0200 len is unsigned and can't be smaller than zero. But vsnprintf(3) returns a signed integer, which can be

Re: [PATCH:libXt 3/6] Mark non-returning function with appropriate attribute.

2013-06-25 Thread Thomas Klausner
On Tue, Jun 25, 2013 at 02:20:58PM -0700, Alan Coopersmith wrote: On 06/25/13 02:02 PM, Thomas Klausner wrote: --- src/Error.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Error.c b/src/Error.c index fc9b11a..334e001 100644 --- a/src/Error.c +++

Re: managing patches with git

2013-06-25 Thread Alan Coopersmith
On 06/25/13 02:31 PM, Thomas Klausner wrote: Btw, what's the appropriate method to create a patch that's a merged version of previous patches, which are separate commits in my local copy of the repository? Just creating diffs against origin like I do now creates patches in a different format. On

Re: managing patches with git

2013-06-25 Thread Daniel Stone
Hi, On 25 June 2013 23:13, Alan Coopersmith alan.coopersm...@oracle.com wrote: On 06/25/13 02:31 PM, Thomas Klausner wrote: Btw, what's the appropriate method to create a patch that's a merged version of previous patches, which are separate commits in my local copy of the repository? Just

[PATCH:libXt 1/6] Use appropriate variable type for vsnprintf return value.

2013-06-25 Thread Thomas Klausner
--- src/Alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Alloc.c b/src/Alloc.c index c523d81..c9ffce8 100644 --- a/src/Alloc.c +++ b/src/Alloc.c @@ -133,7 +133,7 @@ Cardinal XtAsprintf( ...) { char buf[256]; -Cardinal len; +int len; va_list

[PATCH:libXt 3/6] Mark non-returning function with appropriate attribute.

2013-06-25 Thread Thomas Klausner
--- src/Error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Error.c b/src/Error.c index fc9b11a..50f6c3c 100644 --- a/src/Error.c +++ b/src/Error.c @@ -89,7 +89,7 @@ static XrmDatabase errorDB = NULL; static Boolean error_inited = FALSE; void

Re: managing patches with git

2013-06-25 Thread Thomas Klausner
On Tue, Jun 25, 2013 at 03:13:18PM -0700, Alan Coopersmith wrote: To resync with HEAD, I use git pull --rebase. To merge patches, or change previous ones, I use git rebase -i origin, especially with the squash and fixup options (or reword if I'm just adding reviewed-by tags similar commit