Menu

#161 [Workaround] GCC 15: Build error `encrypt.c:329:25: error: passing argument 1 of ‘time’ makes pointer from integer without a cast [-Wint-conversion]`.

v1.0 (example)
closed-fixed
nobody
None
5
2025-10-01
2025-09-30
Drei Eck
No

With GCC 15.2.1, it fails to build with

encrypt.c: In function PE_store_msg:
encrypt.c:329:25: error: passing argument 1 of time makes pointer from integer without a cast [-Wint-conversion]
  329 |    newnode->time = time((time_t)NULL);
      |                         ^
      |                         |
      |                         long int
[...]

Adding -Wno-error=int-conversion to CFLAGS does workaround this, but a proper fix would be to fix the code.

Regards!

Discussion

  • Bill Tompkins

    Bill Tompkins - 2025-10-01

    Thanks for the bug report, I've updated the SVN / trunk with a fix to the code: the cast should be to (time_t *) rather than (time_t).

     
  • Bill Tompkins

    Bill Tompkins - 2025-10-01
    • status: open --> closed-fixed
     

Log in to post a comment.