Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922489 - net-misc/adjtimex-1.29-r3 - adjtimex.c:1641:24: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types]
Summary: net-misc/adjtimex-1.29-r3 - adjtimex.c:1641:24: error: passing argument 1 of ...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL: https://github.com/rogers0/adjtimex/i...
Whiteboard:
Keywords:
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2024-01-19 11:18 UTC by ernsteiswuerfel
Modified: 2024-03-06 23:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (1.19-r3, ppc) (adjtimex-1.29-r3:20240119-104337.log,9.55 KB, text/plain)
2024-01-19 11:18 UTC, ernsteiswuerfel
Details
emerge --info (file_922489.txt,6.47 KB, text/plain)
2024-01-19 11:18 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2024-01-19 11:18:07 UTC
Created attachment 882618 [details]
build.log (1.19-r3, ppc)

[...]
powerpc-gentoo-linux-musl-gcc -Os -mcpu=7450 -mtune=7450 -pipe -Os -mcpu=7450 -mtune=7450 -pipe -Wall -Wl,-O1 -Wl,--as-needed -I. -DVERSION=\"1.29\" -o adjtimex  \
	 adjtimex.c mat.o -lm -Wl,-O1 -Wl,--as-needed 
adjtimex.c: In function 'cmos_read_time':
adjtimex.c:926:36: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'time_t' {aka 'long long int'} [-Wformat=]
  926 |     printf ("CMOS time %s (%s) = %ld\n", asctime (&tm),
      |                                  ~~^
      |                                    |
      |                                    long int
      |                                  %lld
......
  930 |             cmos_time);
      |             ~~~~~~~~~               
      |             |
      |             time_t {aka long long int}
adjtimex.c:962:40: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'time_t' {aka 'long long int'} [-Wformat=]
  962 |           printf("WARNING: CMOS time %ld differs from system time %ld by %3.2f hours\n",
      |                                      ~~^
      |                                        |
      |                                        long int
      |                                      %lld
  963 |                  cmos_time, now.tv_sec, (summertime_correction)/3600.);
      |                  ~~~~~~~~~              
      |                  |
      |                  time_t {aka long long int}
adjtimex.c:962:69: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'time_t' {aka 'long long int'} [-Wformat=]
  962 |           printf("WARNING: CMOS time %ld differs from system time %ld by %3.2f hours\n",
      |                                                                   ~~^
      |                                                                     |
      |                                                                     long int
      |                                                                   %lld
  963 |                  cmos_time, now.tv_sec, (summertime_correction)/3600.);
      |                             ~~~~~~~~~~                               
      |                                |
      |                                time_t {aka long long int}
adjtimex.c: In function 'valid_system_rate':
adjtimex.c:1641:24: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types]
 1641 |                  ctime(&pca->ca_adj_time));
      |                        ^~~~~~~~~~~~~~~~~
      |                        |
      |                        long int *
In file included from adjtimex.c:33:
/usr/include/time.h:62:14: note: expected 'const time_t *' {aka 'const long long int *'} but argument is of type 'long int *'
   62 | char *ctime (const time_t *);
      |              ^~~~~~~~~~~~~~
make: *** [Makefile:39: adjtimex] Error 1
 * ERROR: net-misc/adjtimex-1.29-r3::gentoo failed (compile phase):
 *   emake failed
Comment 1 ernsteiswuerfel archtester 2024-01-19 11:18:43 UTC
Created attachment 882619 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2024-03-06 23:25:50 UTC
There is an upstream git issue tracker where I posted the bug just now, but there has been no upstream activity for ~3 years.