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

Side by Side Diff: third_party/leveldatabase/chromium_logger.h

Issue 432083003: fix warning in third_party/leveldatabase/chromium_logger.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_ 5 #ifndef THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_
6 #define THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_ 6 #define THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 28 matching lines...) Expand all
39 bufsize = 30000; 39 bufsize = 30000;
40 base = new char[bufsize]; 40 base = new char[bufsize];
41 } 41 }
42 char* p = base; 42 char* p = base;
43 char* limit = base + bufsize; 43 char* limit = base + bufsize;
44 44
45 ::base::Time::Exploded t; 45 ::base::Time::Exploded t;
46 ::base::Time::Now().LocalExplode(&t); 46 ::base::Time::Now().LocalExplode(&t);
47 47
48 p += ::base::snprintf(p, limit - p, 48 p += ::base::snprintf(p, limit - p,
49 "%04d/%02d/%02d-%02d:%02d:%02d.%03d %" PRIu64 " ", 49 "%04d/%02d/%02d-%02d:%02d:%02d.%03d %llu ",
cmumford 2014/07/31 20:56:13 On some platforms (OSX I believe) pid_t (PlatformT
Mostyn Bramley-Moore 2014/07/31 21:22:17 (I'll switch to jsbell's suggestion.)
50 t.year, 50 t.year,
51 t.month, 51 t.month,
52 t.day_of_month, 52 t.day_of_month,
53 t.hour, 53 t.hour,
54 t.minute, 54 t.minute,
55 t.second, 55 t.second,
56 t.millisecond, 56 t.millisecond,
57 static_cast<long long unsigned int>(thread_id)); 57 static_cast<long long unsigned int>(thread_id));
58 58
59 // Print the message 59 // Print the message
(...skipping 28 matching lines...) Expand all
88 } 88 }
89 } 89 }
90 90
91 private: 91 private:
92 FILE* file_; 92 FILE* file_;
93 }; 93 };
94 94
95 } // namespace leveldb 95 } // namespace leveldb
96 96
97 #endif // THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_ 97 #endif // THIRD_PARTY_LEVELDATABASE_CHROMIUM_LOGGER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698