Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
spdlog
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
spdlog
Commits
0b1ab6c1
Commit
0b1ab6c1
authored
Nov 29, 2015
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed gcc shadow warning
parent
bb32fa18
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
file_helper.h
include/spdlog/details/file_helper.h
+5
-5
No files found.
include/spdlog/details/file_helper.h
View file @
0b1ab6c1
...
...
@@ -85,9 +85,9 @@ public:
void
write
(
const
log_msg
&
msg
)
{
size_t
size
=
msg
.
formatted
.
size
();
size_t
msg_
size
=
msg
.
formatted
.
size
();
auto
data
=
msg
.
formatted
.
data
();
if
(
std
::
fwrite
(
data
,
1
,
size
,
_fd
)
!=
size
)
if
(
std
::
fwrite
(
data
,
1
,
msg_size
,
_fd
)
!=
msg_
size
)
throw
spdlog_ex
(
"Failed writing to file "
+
_filename
);
if
(
_force_flush
)
...
...
@@ -104,16 +104,16 @@ public:
if
(
fseek
(
_fd
,
0
,
SEEK_END
)
!=
0
)
throw
spdlog_ex
(
"fseek failed on file "
+
_filename
);
auto
size
=
ftell
(
_fd
);
auto
file_
size
=
ftell
(
_fd
);
if
(
fseek
(
_fd
,
pos
,
SEEK_SET
)
!=
0
)
throw
spdlog_ex
(
"fseek failed on file "
+
_filename
);
if
(
size
==
-
1
)
if
(
file_
size
==
-
1
)
throw
spdlog_ex
(
"ftell failed on file "
+
_filename
);
return
size
;
return
file_
size
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment