Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Side by Side Diff: base/debug/stack_trace.h

Issue 10834006: Coverity: Fully initialize the |trace_| member variable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/debug/stack_trace.cc » ('j') | base/debug/stack_trace_win.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_DEBUG_STACK_TRACE_H_ 5 #ifndef BASE_DEBUG_STACK_TRACE_H_
6 #define BASE_DEBUG_STACK_TRACE_H_ 6 #define BASE_DEBUG_STACK_TRACE_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <string> 9 #include <string>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 std::string ToString() const; 56 std::string ToString() const;
57 57
58 private: 58 private:
59 // From http://msdn.microsoft.com/en-us/library/bb204633.aspx, 59 // From http://msdn.microsoft.com/en-us/library/bb204633.aspx,
60 // the sum of FramesToSkip and FramesToCapture must be less than 63, 60 // the sum of FramesToSkip and FramesToCapture must be less than 63,
61 // so set it to 62. Even if on POSIX it could be a larger value, it usually 61 // so set it to 62. Even if on POSIX it could be a larger value, it usually
62 // doesn't give much more information. 62 // doesn't give much more information.
63 static const int kMaxTraces = 62; 63 static const int kMaxTraces = 62;
64 64
65 void* trace_[kMaxTraces]; 65 void* trace_[kMaxTraces];
66 int count_; 66
67 // The number of valid frames in |trace_|.
68 size_t count_;
67 }; 69 };
68 70
69 } // namespace debug 71 } // namespace debug
70 } // namespace base 72 } // namespace base
71 73
72 #endif // BASE_DEBUG_STACK_TRACE_H_ 74 #endif // BASE_DEBUG_STACK_TRACE_H_
OLDNEW
« no previous file with comments | « no previous file | base/debug/stack_trace.cc » ('j') | base/debug/stack_trace_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698