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

André Draszik git at andred.net
Wed Sep 28 11:56:29 UTC 2016


Ups, sorry for that... :-(

Should I send a patch against master-next, or against master?

a.

On Mi, 2016-09-28 at 11:54 +0100, Burton, Ross wrote:
> 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



More information about the Openembedded-core mailing list