View Issue Details

IDProjectCategoryView StatusLast Update
0033472CommunityOCCT:Foundation Classespublic2023-09-15 12:05
Reporterdirk-olbrich Assigned Todpasukhi  
PrioritynormalSeveritytrivial 
Status newResolutionopen 
PlatformMacOSOS 
Product Version7.7.1 
Target Version7.8.0 
Summary0033472: Foundation Classes - NCollection_UBTreeFiller compiler warning -Wdeprecated-declarations
DescriptionDuring compilation of a project using OpenCascade v7.7.2 I get an annoying compiler warning regarding a deprecated use of `sprintf(3)` in the OpenCascade source:
/opt/homebrew/include/opencascade/NCollection_UBTreeFiller.hxx:188:3: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
  sprintf (buf,  "Checking UBTree:%8d leaves, balance =%7.2f",
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
Does anyone else see this warning on other OCC versions, other compilers or other systems? I have searched the OpenCascade issue tracker but haven’t found anything regarding NCollection_UBTreeFiller. Otherwise I would open an issue in the OCC tracker and hope for a downstream fix.

System: macOS M1 arm64
Compiler: llvm clang 16 (homebrew version)
OpenCascade: 7.7.2 (homebrew version)
TagsNo tags attached.
Test case number

Activities

dirk-olbrich

2023-09-15 10:49

reporter   ~0114175

Hey, I just reported this issue. I am not a dev knowledgable in the OCC source code. Please sign someone else from the OCC team to this issue.

dpasukhi

2023-09-15 12:05

administrator   ~0114176

@dirk-olbrich I will fix it. Thank you for your investigation.

Issue History

Date Modified Username Field Change
2023-09-07 18:19 dirk-olbrich New Issue
2023-09-07 18:19 dirk-olbrich Assigned To => akaftasev
2023-09-07 18:26 dpasukhi Assigned To akaftasev => dpasukhi
2023-09-07 18:26 dpasukhi Severity minor => trivial
2023-09-07 18:27 dpasukhi Assigned To dpasukhi => dirk-olbrich
2023-09-07 18:27 dpasukhi Summary NCollection_UBTreeFiller compiler warning -Wdeprecated-declarations => Foundation Classes - NCollection_UBTreeFiller compiler warning -Wdeprecated-declarations
2023-09-15 10:49 dirk-olbrich Note Added: 0114175
2023-09-15 10:50 dpasukhi Target Version => 7.8.0
2023-09-15 10:50 dpasukhi Assigned To dirk-olbrich => dpasukhi
2023-09-15 10:51 dpasukhi Description Updated
2023-09-15 10:51 dpasukhi Description Updated
2023-09-15 12:05 dpasukhi Note Added: 0114176