Archived issue #0029904

Coding - GCC compiler warnings in OCCT on Fedora 26 64 bit

Open CASCADEOCCT:Codingclosed6 public notes

Search issues

Description

gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)

IFSelect_ShareOut.cxx:308, GNU C Compiler 4 (gcc), Priority: Normal
'%d' directive writing between 1 and 10 bytes into a region of size 8 [-Wformat-overflow=]

IGESData_IGESWriter.cxx:472, GNU C Compiler 4 (gcc), Priority: Normal
'%7.7d' directive writing between 7 and 10 bytes into a region of size 8 [-Wformat-overflow=]

IGESData_IGESWriter.cxx:472, GNU C Compiler 4 (gcc), Priority: Normal
' T0000001' directive writing 48 bytes into a region of size between 33 and 49 [-Wformat-overflow=]

IGESData_IGESWriter.cxx:472, GNU C Compiler 4 (gcc), Priority: Normal
'%7.7d' directive writing between 7 and 10 bytes into a region of size between 0 and 8 [-Wformat-overflow=]

Steps to reproduce

Build with GCC7.3

Public activity

6 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: abv
Date: Wed Jul 4 00:54:46 2018 +0300

    0029904: Coding - GCC compiler warnings in OCCT on Fedora 26 64 bit
    
    String buffers are increased to be sufficient to accommodate result of sprintf() for any possible values of integer values being printed.
02Commenter 2
Fix pushed to CR29904, please review. I suppose that testing is not needed, but we need to check that the warnings disappeared (I could not).
03Commenter 2
> I suppose that testing is not needed,
> but we need to check that the warnings disappeared (I could not).
Looks OK, only -Warray-bounds warning remains:
http://jenkins-test-12.nnov.opencascade.com/view/CR29904-master-KGV/
04Commenter 2
Please close duplicate.
05Author
Problem has been fixed in framework 0029834
06Commenter 1
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records