Archived issue #0032727

Coding Rules - eliminate CLang warning -Wshorten-64-to-32 in MessageView_ActionsTest.cxx

Open CASCADEOCCT:Codingclosed4 public notes

Search issues

Description

The following compiler warning should be eliminated [CR0-WEEK-49_CR0-WEEK-49-OCCT-Arm64-macosx-shared-opt-compile]:
[user path removed]/builds/CR0-WEEK-49_CR0-WEEK-49/OCCT_SRC/tools/MessageView/MessageView_ActionsTest.cxx:153:30: warning: implicit conversion loses integer precision: 'clock_t' (aka 'unsigned long') to 'unsigned int' [-Wshorten-64-to-32]
  unsigned int start_time =  clock();
               ~~~~~~~~~~    ^~~~~~~

[user path removed]/builds/CR0-WEEK-49_CR0-WEEK-49/OCCT_SRC/tools/MessageView/MessageView_ActionsTest.cxx:175:27: warning: implicit conversion loses integer precision: 'clock_t' (aka 'unsigned long') to 'unsigned int' [-Wshorten-64-to-32]
  unsigned int end_time = clock();
               ~~~~~~~~   ^~~~~~~

Steps to reproduce

N/A

Public activity

4 archived notes

Participants are labeled by their role within this record.

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

[revision removed]


Detailed log of new commits:

Author: Author
Date: Wed Dec 8 22:45:18 2021 +0300

    0032727: Coding Rules - eliminate CLang warning -Wshorten-64-to-32 in MessageView_ActionsTest.cxx
02Author
03Commenter 3
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18222.380000000427 / 18166.60000000042 [+0.31%]
Products
Total CPU difference: 11645.100000000084 / 11658.820000000103 [-0.12%]
Windows-64-VC14:
OCCT
Total CPU difference: 19999.4375 / 19937.953125 [+0.31%]
Products
Total CPU difference: 13044.453125 / 13069.28125 [-0.19%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
04Commenter 1
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records