git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] test-xml-encode: fix sparse NULL pointer warnings
@ 2019-01-26 21:03 Ramsay Jones
  2019-01-28 16:10 ` sparse job, was " Johannes Schindelin
  0 siblings, 1 reply; 8+ messages in thread
From: Ramsay Jones @ 2019-01-26 21:03 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Junio C Hamano, GIT Mailing-list


Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Johannes,

If you need to re-roll your 'js/vsts-ci' branch, could you please
squash this into the relevant patch (commit af7747e7c7 ("tests: optionally
write results as JUnit-style .xml", 2019-01-23)).

Thanks!

ATB,
Ramsay Jones

 t/helper/test-xml-encode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/helper/test-xml-encode.c b/t/helper/test-xml-encode.c
index 367c4875e6..a648bbd961 100644
--- a/t/helper/test-xml-encode.c
+++ b/t/helper/test-xml-encode.c
@@ -26,7 +26,7 @@ int cmd__xml_encode(int argc, const char **argv)
 		if (tmp2) {
 			if ((ch & 0xc0) != 0x80) {
 				fputs(utf8_replace_character, stdout);
-				tmp2 = 0;
+				tmp2 = NULL;
 				cur--;
 				continue;
 			}
@@ -34,7 +34,7 @@ int cmd__xml_encode(int argc, const char **argv)
 			tmp2++;
 			if (--remaining == 0) {
 				fwrite(tmp, tmp2 - tmp, 1, stdout);
-				tmp2 = 0;
+				tmp2 = NULL;
 			}
 			continue;
 		}
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* sparse job, was Re: [PATCH] test-xml-encode: fix sparse NULL pointer warnings
  2019-01-26 21:03 [PATCH] test-xml-encode: fix sparse NULL pointer warnings Ramsay Jones
@ 2019-01-28 16:10 ` Johannes Schindelin
  2019-01-28 20:13   ` Ramsay Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Schindelin @ 2019-01-28 16:10 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list

Hi Ramsay,

On Sat, 26 Jan 2019, Ramsay Jones wrote:

> 
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
> 
> Hi Johannes,
> 
> If you need to re-roll your 'js/vsts-ci' branch, could you please
> squash this into the relevant patch (commit af7747e7c7 ("tests: optionally
> write results as JUnit-style .xml", 2019-01-23)).

Certainly!

BTW would you be interested in working with me on an Azure Pipeline that
runs `sparse` on all of Junio's branches? (I am now pretty proficient with
building a software package in one Azure Pipeline, publishing it as a
build artifact, then consuming it from another Azure Pipeline, so I would
build the `sparse` package as an Ubuntu package and offer it as a build
artifact.)

I seem to recall that you once explained to me what it takes, but that
mail vanished from my inbox and I cannot find it.

Thanks,
Dscho

> 
> Thanks!
> 
> ATB,
> Ramsay Jones
> 
>  t/helper/test-xml-encode.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/t/helper/test-xml-encode.c b/t/helper/test-xml-encode.c
> index 367c4875e6..a648bbd961 100644
> --- a/t/helper/test-xml-encode.c
> +++ b/t/helper/test-xml-encode.c
> @@ -26,7 +26,7 @@ int cmd__xml_encode(int argc, const char **argv)
>  		if (tmp2) {
>  			if ((ch & 0xc0) != 0x80) {
>  				fputs(utf8_replace_character, stdout);
> -				tmp2 = 0;
> +				tmp2 = NULL;
>  				cur--;
>  				continue;
>  			}
> @@ -34,7 +34,7 @@ int cmd__xml_encode(int argc, const char **argv)
>  			tmp2++;
>  			if (--remaining == 0) {
>  				fwrite(tmp, tmp2 - tmp, 1, stdout);
> -				tmp2 = 0;
> +				tmp2 = NULL;
>  			}
>  			continue;
>  		}
> -- 
> 2.20.0
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sparse job, was Re: [PATCH] test-xml-encode: fix sparse NULL pointer warnings
  2019-01-28 16:10 ` sparse job, was " Johannes Schindelin
@ 2019-01-28 20:13   ` Ramsay Jones
  2019-01-28 22:34     ` Johannes Schindelin
                       ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ramsay Jones @ 2019-01-28 20:13 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Junio C Hamano, GIT Mailing-list



On 28/01/2019 16:10, Johannes Schindelin wrote:
> Hi Ramsay,
> 
> On Sat, 26 Jan 2019, Ramsay Jones wrote:
> 
>>
>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
>> ---
>>
>> Hi Johannes,
>>
>> If you need to re-roll your 'js/vsts-ci' branch, could you please
>> squash this into the relevant patch (commit af7747e7c7 ("tests: optionally
>> write results as JUnit-style .xml", 2019-01-23)).
> 
> Certainly!
> 
> BTW would you be interested in working with me on an Azure Pipeline that
> runs `sparse` on all of Junio's branches? (I am now pretty proficient with
> building a software package in one Azure Pipeline, publishing it as a
> build artifact, then consuming it from another Azure Pipeline, so I would
> build the `sparse` package as an Ubuntu package and offer it as a build
> artifact.)

Happy to help, if I can.

Looking at the sparse wiki [1] we can see that the most recent
release of sparse is v0.6.0, released on December 26th 2018
(just too late for crimble!).  This is the release you will
need to use for more recent Linux distros (eg. fedora 27+,
Ubuntu 18.04, 18.10, etc).

The releases are available from [2] as a compressed tar-ball
using '.gz' or .'xz' compression. eg. sparse-0.6.0.tar.gz
(there is also a sparse-0.6.0.tar.sign).

[The git repo is at [3], BTW].

[I was a little surprised that Linux Mint 19.1 (based on Ubuntu
18.04) has v0.5.1 - Debian unstable has v0.5.2, but both of those
are just a little too old for use with git on recent Linux.]

It seems Ubuntu has split sparse into two packages, the main
'sparse' package, which contains the command-line programs and
a 'sparse-test-inspect' package, which contains the 'test-inspect'
GUI program (and so depends on GTK).

The dependencies for the 'sparse' package includes: libc6 (>= 2.14),
libllvm4.0 (>= 1:4.0~), libxml2 (>= 2.7.4), perl:any

However, for git, we only need to build 'cgcc' and 'sparse', which
means we can forget about libxml (only used for c2xml), and libllvm
(only used for sparse-llvm/sparsec/sparsei). Also, I'm not sure what
perl is doing there ...

Note that these dependencies (along with the dependent programs) are
optional and I can happily build sparse without them:

  $ make clean
  Makefile:124: Your system does not have libxml, disabling c2xml
  Makefile:146: Your system does not have gtk3/gtk2, disabling test-inspect
  Makefile:179: Your system does not have llvm, disabling sparse-llvm
    CLEAN
  $ 

Hmm, I've never built an Ubuntu package before, so I don't know
exactly what would be required (spec file etc.) to create a PPA.
But I suspect you are not talking about doing that, right?

ATB,
Ramsay Jones

[1] https://sparse.wiki.kernel.org/index.php/Main_Page
[2] http://www.kernel.org/pub/software/devel/sparse/dist/
[3] git://git.kernel.org/pub/scm/devel/sparse/sparse.git


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sparse job, was Re: [PATCH] test-xml-encode: fix sparse NULL pointer warnings
  2019-01-28 20:13   ` Ramsay Jones
@ 2019-01-28 22:34     ` Johannes Schindelin
  2019-01-29  0:02       ` Ramsay Jones
  2019-01-29  1:44     ` Jonathan Nieder
  2019-01-29  1:52     ` Luc Van Oostenryck
  2 siblings, 1 reply; 8+ messages in thread
From: Johannes Schindelin @ 2019-01-28 22:34 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list

Hi Ramsay,

On Mon, 28 Jan 2019, Ramsay Jones wrote:

> Hmm, I've never built an Ubuntu package before, so I don't know
> exactly what would be required (spec file etc.) to create a PPA.
> But I suspect you are not talking about doing that, right?

I would have gone for `checkinstall`... That still works, right?

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sparse job, was Re: [PATCH] test-xml-encode: fix sparse NULL pointer warnings
  2019-01-28 22:34     ` Johannes Schindelin
@ 2019-01-29  0:02       ` Ramsay Jones
  0 siblings, 0 replies; 8+ messages in thread
From: Ramsay Jones @ 2019-01-29  0:02 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Junio C Hamano, GIT Mailing-list, Luc Van Oostenryck



On 28/01/2019 22:34, Johannes Schindelin wrote:
> Hi Ramsay,
> 
> On Mon, 28 Jan 2019, Ramsay Jones wrote:
> 
>> Hmm, I've never built an Ubuntu package before, so I don't know
>> exactly what would be required (spec file etc.) to create a PPA.
>> But I suspect you are not talking about doing that, right?
> 
> I would have gone for `checkinstall`... That still works, right?

Ah, I never think about using checkinstall - I haven't really used
it in anger. For some reason, I thought you needed to structure your
Makefile a certain way (using $DESTDIR or somesuch), but I seem to
be confusing it with something else. Apparently, no change to the
Makefile is required - it uses some kind of filesystem watcher to
note which files are copied into place by 'make install'. heh, go
figure! :-D

So, I think you only need to set the PREFIX when building (the
default installation PREFIX is $HOME), or create a local.mk file
to configure the build (I don't do that).  The 'sparse' build
does not make use of any 'auto-tools', so no configure script.

Ah, I think you will need to have pkg-config installed. I have
never built sparse from a tar-ball - I assume it works! ;-)

So (just typing into my email client - not tested):

  $ wget http://www.kernel.org/pub/software/devel/sparse/dist/sparse-0.6.0.tar.gz
  $ tar xvf sparse-0.6.0.tar.gz
  $ cd sparse-0.6.0
  $ make PREFIX=/usr/local
  $ sudo checkinstall make PREFIX=/usr/local install

... should do it. (famous last words).

ATB,
Ramsay Jones


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sparse job, was Re: [PATCH] test-xml-encode: fix sparse NULL pointer warnings
  2019-01-28 20:13   ` Ramsay Jones
  2019-01-28 22:34     ` Johannes Schindelin
@ 2019-01-29  1:44     ` Jonathan Nieder
  2019-01-29  1:52     ` Luc Van Oostenryck
  2 siblings, 0 replies; 8+ messages in thread
From: Jonathan Nieder @ 2019-01-29  1:44 UTC (permalink / raw)
  To: Ramsay Jones
  Cc: Johannes Schindelin, Junio C Hamano, GIT Mailing-list,
	Uwe Kleine-König

(+cc: Uwe Kleine-König, maintainer of the sparse package in Debian)
Hi,

Ramsay Jones wrote[1]:

> Hmm, I've never built an Ubuntu package before, so I don't know
> exactly what would be required (spec file etc.) to create a PPA.
> But I suspect you are not talking about doing that, right?

Ubuntu uses the sparse packaging as is from Debian, so no PPA should
be needed.  I've sent https://bugs.debian.org/920776 to get the
package updated in Debian.  If all is well, it should go smoothly.

Thanks,
Jonathan

[1] https://public-inbox.org/git/ef5a8623-e5e6-5cc8-5178-0afce7b5499e@ramsayjones.plus.com/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sparse job, was Re: [PATCH] test-xml-encode: fix sparse NULL pointer warnings
  2019-01-28 20:13   ` Ramsay Jones
  2019-01-28 22:34     ` Johannes Schindelin
  2019-01-29  1:44     ` Jonathan Nieder
@ 2019-01-29  1:52     ` Luc Van Oostenryck
  2019-01-29  2:23       ` Ramsay Jones
  2 siblings, 1 reply; 8+ messages in thread
From: Luc Van Oostenryck @ 2019-01-29  1:52 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Johannes Schindelin, Junio C Hamano, GIT Mailing-list

On Mon, Jan 28, 2019 at 08:13:03PM +0000, Ramsay Jones wrote:

Hi

> The dependencies for the 'sparse' package includes: libc6 (>= 2.14),
> libllvm4.0 (>= 1:4.0~), libxml2 (>= 2.7.4), perl:any
> 
> However, for git, we only need to build 'cgcc' and 'sparse', which
> means we can forget about libxml (only used for c2xml), and libllvm
> (only used for sparse-llvm/sparsec/sparsei). Also, I'm not sure what
> perl is doing there ...

perl is only used as the interpreter of cgcc.

> 
> Note that these dependencies (along with the dependent programs) are
> optional and I can happily build sparse without them:
> 
>   $ make clean
>   Makefile:124: Your system does not have libxml, disabling c2xml
>   Makefile:146: Your system does not have gtk3/gtk2, disabling test-inspect
>   Makefile:179: Your system does not have llvm, disabling sparse-llvm
>     CLEAN
>   $ 

Absolutely.
 
-- Luc (sparse's maintainer)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sparse job, was Re: [PATCH] test-xml-encode: fix sparse NULL pointer warnings
  2019-01-29  1:52     ` Luc Van Oostenryck
@ 2019-01-29  2:23       ` Ramsay Jones
  0 siblings, 0 replies; 8+ messages in thread
From: Ramsay Jones @ 2019-01-29  2:23 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: Johannes Schindelin, Junio C Hamano, GIT Mailing-list



On 29/01/2019 01:52, Luc Van Oostenryck wrote:
> On Mon, Jan 28, 2019 at 08:13:03PM +0000, Ramsay Jones wrote:
> 
> Hi
> 
>> The dependencies for the 'sparse' package includes: libc6 (>= 2.14),
>> libllvm4.0 (>= 1:4.0~), libxml2 (>= 2.7.4), perl:any
>>
>> However, for git, we only need to build 'cgcc' and 'sparse', which
>> means we can forget about libxml (only used for c2xml), and libllvm
>> (only used for sparse-llvm/sparsec/sparsei). Also, I'm not sure what
>> perl is doing there ...
> 
> perl is only used as the interpreter of cgcc.

heh, yeah (palm-face), I was only thinking about _build_ dependency! :-D

ATB,
Ramsay Jones


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-01-29  2:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-26 21:03 [PATCH] test-xml-encode: fix sparse NULL pointer warnings Ramsay Jones
2019-01-28 16:10 ` sparse job, was " Johannes Schindelin
2019-01-28 20:13   ` Ramsay Jones
2019-01-28 22:34     ` Johannes Schindelin
2019-01-29  0:02       ` Ramsay Jones
2019-01-29  1:44     ` Jonathan Nieder
2019-01-29  1:52     ` Luc Van Oostenryck
2019-01-29  2:23       ` Ramsay Jones

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).