wget-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wget2 | Draft: Small fixes (!505)


From: @rockdaboot
Subject: Re: wget2 | Draft: Small fixes (!505)
Date: Sat, 28 May 2022 17:02:23 +0000



Tim Rühsen commented on a discussion on unit-tests/test.c: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/505#note_963269376

>       CHECK(!wget_memdup(NULL, 4));
>       CHECK(p = wget_memdup("xxx", 0)); xfree(p);
>       CHECK(p = wget_memdup("xxx", 4));
> -     CHECK(!memcmp(p, "xxx", 4)); xfree(p);
> +     if (p) {

Thanks for this.

So I guess what Darshit says is: Since none of the test should fail anyways, we 
can exit immediately if it happens instead of trying to run all the other tests 
as well.

We can do that with
```
wget_error_printf_exit("L%d: %s\n", line, msg);
```
in `check()`.

It should be enough to calm down scan-build (what version / options are you 
using ? It doesn't fail in our CI, or does it ?).

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/505#note_963269376
You're receiving this email because of your account on gitlab.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]