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
c8c99736
Commit
c8c99736
authored
Jul 19, 2016
by
Nils Moehrle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unreachable code below FMT_THROW
parent
65cd6641
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
fmt/format.h
fmt/format.h
+6
-7
No files found.
fmt/format.h
View file @
c8c99736
...
@@ -237,7 +237,7 @@ typedef __int64 intmax_t;
...
@@ -237,7 +237,7 @@ typedef __int64 intmax_t;
# define FMT_BUILTIN_CLZLL(n) __builtin_clzll(n)
# define FMT_BUILTIN_CLZLL(n) __builtin_clzll(n)
#endif
#endif
// Some compilers masquerade as both MSVC and GCC-likes or
// Some compilers masquerade as both MSVC and GCC-likes or
// otherwise support __builtin_clz and __builtin_clzll, so
// otherwise support __builtin_clz and __builtin_clzll, so
// only define FMT_BUILTIN_CLZ using the MSVC intrinsics
// only define FMT_BUILTIN_CLZ using the MSVC intrinsics
// if the clz and clzll builtins are not available.
// if the clz and clzll builtins are not available.
...
@@ -253,7 +253,7 @@ inline uint32_t clz(uint32_t x) {
...
@@ -253,7 +253,7 @@ inline uint32_t clz(uint32_t x) {
assert
(
x
!=
0
);
assert
(
x
!=
0
);
// Static analysis complains about using uninitialized data
// Static analysis complains about using uninitialized data
// "r", but the only way that can happen is if "x" is 0,
// "r", but the only way that can happen is if "x" is 0,
// which the callers guarantee to not happen.
// which the callers guarantee to not happen.
# pragma warning(suppress: 6102)
# pragma warning(suppress: 6102)
return
31
-
r
;
return
31
-
r
;
...
@@ -279,7 +279,7 @@ inline uint32_t clzll(uint64_t x) {
...
@@ -279,7 +279,7 @@ inline uint32_t clzll(uint64_t x) {
assert
(
x
!=
0
);
assert
(
x
!=
0
);
// Static analysis complains about using uninitialized data
// Static analysis complains about using uninitialized data
// "r", but the only way that can happen is if "x" is 0,
// "r", but the only way that can happen is if "x" is 0,
// which the callers guarantee to not happen.
// which the callers guarantee to not happen.
# pragma warning(suppress: 6102)
# pragma warning(suppress: 6102)
return
63
-
r
;
return
63
-
r
;
...
@@ -1296,7 +1296,7 @@ public:
...
@@ -1296,7 +1296,7 @@ public:
MakeArg
()
{
MakeArg
()
{
type
=
Arg
::
NONE
;
type
=
Arg
::
NONE
;
}
}
template
<
typename
T
>
template
<
typename
T
>
MakeArg
(
const
T
&
value
)
MakeArg
(
const
T
&
value
)
:
Arg
(
MakeValue
<
Formatter
>
(
value
))
{
:
Arg
(
MakeValue
<
Formatter
>
(
value
))
{
...
@@ -2074,7 +2074,7 @@ struct ArgArray;
...
@@ -2074,7 +2074,7 @@ struct ArgArray;
template
<
unsigned
N
>
template
<
unsigned
N
>
struct
ArgArray
<
N
,
true
/*IsPacked*/
>
{
struct
ArgArray
<
N
,
true
/*IsPacked*/
>
{
typedef
Value
Type
[
N
>
0
?
N
:
1
];
typedef
Value
Type
[
N
>
0
?
N
:
1
];
template
<
typename
Formatter
,
typename
T
>
template
<
typename
Formatter
,
typename
T
>
static
Value
make
(
const
T
&
value
)
{
static
Value
make
(
const
T
&
value
)
{
#ifdef __clang__
#ifdef __clang__
...
@@ -2272,7 +2272,7 @@ class SystemError : public internal::RuntimeError {
...
@@ -2272,7 +2272,7 @@ class SystemError : public internal::RuntimeError {
Formats an error returned by an operating system or a language runtime,
Formats an error returned by an operating system or a language runtime,
for example a file opening error, and writes it to *out* in the following
for example a file opening error, and writes it to *out* in the following
form:
form:
.. parsed-literal::
.. parsed-literal::
*<message>*: *<system-message>*
*<message>*: *<system-message>*
...
@@ -2614,7 +2614,6 @@ void BasicWriter<Char>::write_str(
...
@@ -2614,7 +2614,6 @@ void BasicWriter<Char>::write_str(
if
(
str_size
==
0
)
{
if
(
str_size
==
0
)
{
if
(
!
str_value
)
{
if
(
!
str_value
)
{
FMT_THROW
(
FormatError
(
"string pointer is null"
));
FMT_THROW
(
FormatError
(
"string pointer is null"
));
return
;
}
}
}
}
std
::
size_t
precision
=
static_cast
<
std
::
size_t
>
(
spec
.
precision_
);
std
::
size_t
precision
=
static_cast
<
std
::
size_t
>
(
spec
.
precision_
);
...
...
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