Bug#790349: bs1770gain: Fail to build when clock_t is not long int

Peter Belkner pbelkner at snafu.de
Sun Jun 28 12:34:08 UTC 2015


Many thanks.

On 28.06.2015 13:23, Petter Reinholdtsen wrote:
> Based on the information available from
> <URL: http://stackoverflow.com/questions/1083142/what-s-the-correct-way-to-use-printf-to-print-a-clock-t >,
> refering to
> <URL: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/types.h.html >
> where it is stated that "clock_t shall be integer or real-floating
> types",

Because "rel-floating types" is mentioned as well I would prefer to fix 
it as follows

    diff -rc bs1770gain-0.4.5/bs1770gain/bs1770gain.c bs1770gain/bs1770gain/bs1770gain.c
    *** bs1770gain-0.4.5/bs1770gain/bs1770gain.c	Wed Jun 24 17:30:10 2015
    --- bs1770gain/bs1770gain/bs1770gain.c	Sun Jun 28 14:24:30 2015
    ***************
    *** 305,311 ****
         char *odirname=NULL;
         int loglevel=AV_LOG_QUIET;
         double overlap;
    !   clock_t t1,t2;
         int c;
       
         if (1==argc)
    --- 305,311 ----
         char *odirname=NULL;
         int loglevel=AV_LOG_QUIET;
         double overlap;
    !   double t1,t2;
         int c;
       
         if (1==argc)
    ***************
    *** 644,650 ****
         root.vmt->cleanup(&root);
       
         if (options.time)
    !     fprintf(stderr, "Duration: %ld ms.\n",(t2-t1)/CLOCKS_PER_MILLIS);
       // cleanup:
         sox_quit();
         // still reachable: 9,689 bytes in 51 blocks
    --- 644,650 ----
         root.vmt->cleanup(&root);
       
         if (options.time)
    !     fprintf(stderr, "Duration: %.0f ms.\n",(t2-t1)/CLOCKS_PER_MILLIS);
       // cleanup:
         sox_quit();
         // still reachable: 9,689 bytes in 51 blocks

Regards,

Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20150628/68eb14fa/attachment-0001.html>


More information about the pkg-multimedia-maintainers mailing list