John Scipione
3c4e26995c
Tracker: small code simplication
...
Use std::max() to avoid comparison and turn into 1-liner.
2014-08-10 15:07:30 -04:00
John Scipione
54e2dd7272
Tracker: style fixes
...
No functional changes intended.
2014-08-10 15:06:34 -04:00
John Scipione
85a2e66cc1
Tracker: Refactor size calc to use a BString
...
By using a BString we can keep track of the string length instead of
calculating the length after hoping that sprintf() works or doing a
bunch more work to check the return values using either snprintf()
or asprintf(). sprintf() was not bounds checked either. As an added
bonus we no longer have to use an arbitrary 1024 bytes size buffer.
CID 991605
2014-08-10 15:06:34 -04:00
John Scipione
a0db774833
Tracker: Style fixes to WidgetAttributeText
...
* rename result to outString
* rename str to inString
2014-08-10 15:06:33 -04:00
John Scipione
e6877f10e0
Tracker: Unintentional integer overflow, CID 701977
2014-08-10 15:06:33 -04:00
John Scipione
3748c166be
Tracker: Set initial value, CID 609895
2014-08-10 15:06:32 -04:00
John Scipione
b7735c4c02
Tracker: Set initial value, CID 609894
2014-08-10 15:06:32 -04:00
John Scipione
9ead583fb3
Tracker: Set default values, CID 609893
2014-08-10 15:06:31 -04:00
John Scipione
cf2902f4d4
Tracker: Potential, but unlikly NULL dereference
2014-08-10 15:06:31 -04:00
John Scipione
a8216d9fef
Tracker: Style fixes to WidgeAttributeText.cpp
2014-08-10 15:06:30 -04:00
John Scipione
95ef540535
Tracker: Unchecked dynamic_cast, CID 611229
2014-08-10 15:06:30 -04:00
John Scipione
a35bd7b065
Tracker: Unchecked dynamic_cast, CID 600452
2014-08-10 15:06:29 -04:00
John Scipione
86c2b955b7
Tracker: Unchecked dynamic_cast, CID 600506
2014-08-10 15:06:28 -04:00
John Scipione
6b51d90211
Tracker: style fixes to FilePanelPriv.cpp
2014-08-10 15:06:28 -04:00
John Scipione
e2ee7b0442
Tracker: Move B_TRANSLATION_CONTEXT to top
...
of FilePanelPriv.cpp
2014-08-10 15:06:27 -04:00
John Scipione
a76808e72e
Tracker: Unchecked dynamic_cast in FilePanelPriv.cpp, CID 300327
2014-08-10 15:06:27 -04:00
John Scipione
e5355e2814
Tracker: Unchecked return values
...
Check that find_directory() and path.Append() succeeded.
2014-08-10 15:06:26 -04:00
John Scipione
38f3b29c70
Tracker: Check dynamic_cast
2014-08-10 15:06:26 -04:00
John Scipione
f0b515eca1
Tracker: Check dereference NULL pointers
...
field->Menu() could return NULL, field->Menu()->FindMarked() could return NULL.
2014-08-10 15:06:25 -04:00
John Scipione
8fbb387b1b
Tracker: check dynamic_cast
2014-08-10 15:06:25 -04:00
John Scipione
fbf61796ca
Tracker: Check dynamic_cast
...
ASSERT that it is not NULL as it shouldn't be.
2014-08-10 15:06:24 -04:00
John Scipione
a2400cc5ca
Tracker: some style fixes to FindPanel
2014-08-10 15:06:24 -04:00
John Scipione
dc28a571c6
Refactor FindPanel::Draw()
...
Check if pointers are NULL before dereferencing them.
2014-08-10 15:06:23 -04:00
John Scipione
dddea1f72f
Tracker: Prefer textControl->Text()
...
over textControl->TextView()->Text(), also SetText()
2014-08-10 15:06:23 -04:00
John Scipione
73de7ce4ec
Tracker: check that textControl->TextView() isn't NULL
2014-08-10 15:06:22 -04:00
John Scipione
a2b0a3c08a
Tracker: refactor FindPanel::SetUpAddRemoveButtons()
...
Instead of passing the box in we can just use FindView to get it,
that's what other methods do. Also, check if removeButton exists
in AddAttrRow() first instead of doing it in this method.
2014-08-10 15:06:22 -04:00
John Scipione
350af1ce3f
Tracker: Unchecked dynamic_cast, CID 1210857
2014-08-10 15:06:21 -04:00
John Scipione
e85fa8f787
Tracker: Unchecked dynamic_cast, CID 1210856
2014-08-10 15:06:21 -04:00
John Scipione
ce04484e6b
Tracker: Dereference NULL pointer, CID 1032279
...
Also a bit of a refactor of GetDefaultAttrName(), check for NULL explicitly,
rename result to attrName
2014-08-10 15:06:20 -04:00
John Scipione
861d997e49
Tracker: Unchecked dynamic_cast, CID 1032264
...
Also some minor refactoring, rename string to textEntryString,
check before dereferencing potentially NULL pointers.
2014-08-10 15:06:20 -04:00
John Scipione
08b7ddae76
Tracker: Unchecked dynamic_cast, CID 1032263
2014-08-10 15:06:19 -04:00
John Scipione
1e09ea53e3
Tracker: Check return values, CID 991051 & CID 991052
...
The CIDs are about mkdir, we want to check that either the command
succeeded or failed because the directory already exists.
However, we also want to check the return value of find_directory()
and Append() to make sure they succeeded as well.
2014-08-10 15:06:19 -04:00
John Scipione
1995f1a63d
Tracker: Check for negative size, CID 610924
2014-08-10 15:06:18 -04:00
John Scipione
1371d18c36
Tracker: Unchecked dynamic_cast, CID 603126
2014-08-10 15:06:18 -04:00
John Scipione
f0eb64b40d
Tracker: Unchecked dynamic_cast, CID 603125
2014-08-10 15:06:17 -04:00
John Scipione
404b6d40d3
Tracker: Unchecked dynamic_cast, CID 603123
2014-08-10 15:06:17 -04:00
John Scipione
ee090c5313
Tracker: Unchecked return value, CID 602471
2014-08-10 15:06:16 -04:00
John Scipione
1cdaa16d12
Tracker: Unchecked dynamic_cast, CID 600353
...
... and possibly others.
2014-08-10 15:06:16 -04:00
John Scipione
6ef1768d76
Tracker: Unchecked dynamic_cast, CID 600349
2014-08-10 15:06:15 -04:00
John Scipione
9fc1e7ffae
Tracker: Unchecked dynamic_cast, CID 600348
2014-08-10 15:06:15 -04:00
John Scipione
d2af6ff104
Tracker: Unchecked dynamic_cast, CID 600347
2014-08-10 15:06:15 -04:00
John Scipione
bee19b9428
Tracker: Unchecked dynamic_cast, CID 600346
2014-08-10 15:06:14 -04:00
John Scipione
35237fd8f3
Tracker: Unchecked dynamic_cast, CID 500345
2014-08-10 15:06:14 -04:00
John Scipione
d6e0dbfe30
Tracker: Unchecked dynamic_cast, CID 600343
2014-08-10 15:06:13 -04:00
John Scipione
bbd3b2d914
Tracker: Unchecked dynamic_cast, CID 600340
2014-08-10 15:06:13 -04:00
John Scipione
cfc444a631
Tracker: Unchecked dynamic_cast, CID 300339
2014-08-10 15:06:12 -04:00
John Scipione
14948881dc
Tracker: Style fixes to FindPanel
2014-08-10 15:06:12 -04:00
John Scipione
d5881312d3
Tracker: reorder includes in FindPanel.cpp
2014-08-10 15:06:11 -04:00
John Scipione
4f48aeed3e
Tracker: Check dynamic_cast, CID 600337
2014-08-10 15:04:53 -04:00
John Scipione
322b28e01b
Tracker: init member var, CID 610121
2014-08-10 15:04:53 -04:00