Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
9fc4161f
Commit
9fc4161f
authored
Jan 22, 2020
by
dspc-douglas
Committed by
Victor Zverovich
Jan 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix interal compiler error when building with mingw
parent
25d6916b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
include/fmt/format-inl.h
include/fmt/format-inl.h
+2
-1
src/format.cc
src/format.cc
+1
-1
No files found.
include/fmt/format-inl.h
View file @
9fc4161f
...
@@ -1147,7 +1147,8 @@ int snprintf_float(T value, int precision, float_specs specs,
...
@@ -1147,7 +1147,8 @@ int snprintf_float(T value, int precision, float_specs specs,
"fuzz mode - avoid large allocation inside snprintf"
);
"fuzz mode - avoid large allocation inside snprintf"
);
#endif
#endif
// Suppress the warning about a nonliteral format string.
// Suppress the warning about a nonliteral format string.
auto
snprintf_ptr
=
FMT_SNPRINTF
;
// Cannot use auto becase of a bug in MinGW (#1532).
int
(
*
snprintf_ptr
)(
char
*
,
size_t
,
const
char
*
,
...)
=
FMT_SNPRINTF
;
int
result
=
precision
>=
0
int
result
=
precision
>=
0
?
snprintf_ptr
(
begin
,
capacity
,
format
,
precision
,
value
)
?
snprintf_ptr
(
begin
,
capacity
,
format
,
precision
,
value
)
:
snprintf_ptr
(
begin
,
capacity
,
format
,
value
);
:
snprintf_ptr
(
begin
,
capacity
,
format
,
value
);
...
...
src/format.cc
View file @
9fc4161f
...
@@ -19,7 +19,7 @@ int format_float(char* buf, std::size_t size, const char* format, int precision,
...
@@ -19,7 +19,7 @@ int format_float(char* buf, std::size_t size, const char* format, int precision,
"fuzz mode - avoid large allocation inside snprintf"
);
"fuzz mode - avoid large allocation inside snprintf"
);
#endif
#endif
// Suppress the warning about nonliteral format string.
// Suppress the warning about nonliteral format string.
auto
snprintf_ptr
=
FMT_SNPRINTF
;
int
(
*
snprintf_ptr
)(
char
*
,
size_t
,
const
char
*
,
...)
=
FMT_SNPRINTF
;
return
precision
<
0
?
snprintf_ptr
(
buf
,
size
,
format
,
value
)
return
precision
<
0
?
snprintf_ptr
(
buf
,
size
,
format
,
value
)
:
snprintf_ptr
(
buf
,
size
,
format
,
precision
,
value
);
:
snprintf_ptr
(
buf
,
size
,
format
,
precision
,
value
);
}
}
...
...
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