[OE-core] [PATCH 2/2] cve-check-tool: report progress when downloading CVE database

Burton, Ross ross.burton at intel.com
Wed Sep 28 10:54:58 UTC 2016


On 26 September 2016 at 16:42, André Draszik <git at andred.net> wrote:

> ++static int progress_callback_new(void *ptr, curl_off_t dltotal,
> curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow)
> ++{
> ++        (void) ultotal;
> ++        (void) ulnow;
> ++
> ++        struct percent_t *percent = (struct percent_t *) ptr;
> ++
> ++        if (dltotal && percent) {
> ++                long diff = percent->end - percent->start;
> ++                if (diff) {
> ++                        fprintf(stderr,"completed: %lu%%\r",
> percent->start + (diff * dlnow / dltotal));
> ++                }
> ++        }
> ++
> ++        return 0;
> ++}
>

This fails on the autobuilder cluster:

| ../../cve-check-tool-5.6.4/src/library/fetch.c: In function
'progress_callback_new':
| ../../cve-check-tool-5.6.4/src/library/fetch.c:55:54: error: format '%lu'
expects argument of type 'long unsigned int', but argument 3 has type
'curl_off_t {aka long long int}' [-Werror=format=]
|                          fprintf(stderr,"completed: %lu%%\r",
percent->start + (diff * dlnow / dltotal));
|                                                       ^

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160928/5851ab5b/attachment-0002.html>


More information about the Openembedded-core mailing list