Project

General

Profile

Bug #13570

libpkg: overflow in conversion

Added by Toomas Soome 18 days ago. Updated 18 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build error with gcc 10:

    ../common/gpkgmap.c: In function 'gpkgmap':
    ../common/gpkgmap.c:156:42: error: overflow in conversion from 'fsblkcnt_t' {aka 'long long unsigned int'} to 'time_t' {aka 'long int'} changes value from 'ept->cinfo.size = 18446744073709551615' to '-1' [-Werror=overflow]
      156 |  ept->cinfo.cksum = ept->cinfo.modtime = ept->cinfo.size = (-1);
          |                                          ^~~
    cc1: all warnings being treated as errors
    *** Error code 1
    dmake: Fatal error: Command failed for target `pics/gpkgmap.o'
    Current working directory /code/illumos-gate/usr/src/lib/libpkg/i386

Initialize one variable at a time.

Testing done: build/install/boot

#1

Updated by Electric Monk 18 days ago

  • Gerrit CR set to 1276

Also available in: Atom PDF