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
6c3d584e
Commit
6c3d584e
authored
Jun 14, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify warning suppression
parent
12f46838
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
include/fmt/format-inl.h
include/fmt/format-inl.h
+4
-2
include/fmt/format.h
include/fmt/format.h
+0
-4
No files found.
include/fmt/format-inl.h
View file @
6c3d584e
...
@@ -247,8 +247,10 @@ template <> FMT_FUNC int count_digits<4>(internal::uintptr n) {
...
@@ -247,8 +247,10 @@ template <> FMT_FUNC int count_digits<4>(internal::uintptr n) {
template
<
typename
T
>
template
<
typename
T
>
int
format_float
(
char
*
buf
,
std
::
size_t
size
,
const
char
*
format
,
int
precision
,
int
format_float
(
char
*
buf
,
std
::
size_t
size
,
const
char
*
format
,
int
precision
,
T
value
)
{
T
value
)
{
return
precision
<
0
?
FMT_SNPRINTF
(
buf
,
size
,
format
,
value
)
// Suppress the warning about nonliteral format string.
:
FMT_SNPRINTF
(
buf
,
size
,
format
,
precision
,
value
);
auto
snprintf_ptr
=
FMT_SNPRINTF
;
return
precision
<
0
?
snprintf_ptr
(
buf
,
size
,
format
,
value
)
:
snprintf_ptr
(
buf
,
size
,
format
,
precision
,
value
);
}
}
template
<
typename
T
>
template
<
typename
T
>
...
...
include/fmt/format.h
View file @
6c3d584e
...
@@ -70,10 +70,6 @@
...
@@ -70,10 +70,6 @@
// Disable the warning about declaration shadowing because it affects too
// Disable the warning about declaration shadowing because it affects too
// many valid cases.
// many valid cases.
# pragma GCC diagnostic ignored "-Wshadow"
# pragma GCC diagnostic ignored "-Wshadow"
// Disable the warning about nonliteral format strings because we construct
// them dynamically when falling back to snprintf for FP formatting.
# pragma GCC diagnostic ignored "-Wformat-nonliteral"
#endif
#endif
#if FMT_CLANG_VERSION
#if FMT_CLANG_VERSION
...
...
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