Skip to content

Conversation

@ip-gpu
Copy link

@ip-gpu ip-gpu commented Nov 1, 2017

I'm a member of the Pinguem.ru competition on finding errors in open source projects. A bug, found using PVS-Studio. Warnings:

V668 There is no sense in testing the 'Vector' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. vector.h 59
V668 There is no sense in testing the 'newindex' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. vector.h 1230
V668 There is no sense in testing the 'section' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. ini.cpp 118
V668 There is no sense in testing the 'entry' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. ini.cpp 150

V668 There is no sense in testing the 'Vector' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. vector.h 59
V668 There is no sense in testing the 'newindex' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. vector.h 1230
V668 There is no sense in testing the 'section' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. ini.cpp 118
V668 There is no sense in testing the 'entry' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. ini.cpp 150
@MrSapps
Copy link

MrSapps commented Jul 5, 2018

May have been better using std::nothrow in these instances?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants