Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
f7b54ca4
Commit
f7b54ca4
authored
Feb 11, 2020
by
Kirill Smelkov
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X avoid fmt::vsprintf (now compils again with latest pygolang@master)
parent
d994f5f3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
wcfs/client/wcfs_misc.cpp
wcfs/client/wcfs_misc.cpp
+3
-0
wcfs/client/wcfs_misc.h
wcfs/client/wcfs_misc.h
+9
-2
No files found.
wcfs/client/wcfs_misc.cpp
View file @
f7b54ca4
...
@@ -224,6 +224,8 @@ tuple<uint64_t, error> parseUint(const string& s) {
...
@@ -224,6 +224,8 @@ tuple<uint64_t, error> parseUint(const string& s) {
// xerr::
// xerr::
namespace
xerr
{
namespace
xerr
{
// XXX don't require fmt::vsprintf
#if 0
Contextf::Contextf(const char *format, ...) {
Contextf::Contextf(const char *format, ...) {
Contextf& c = *this;
Contextf& c = *this;
...
@@ -232,6 +234,7 @@ Contextf::Contextf(const char *format, ...) {
...
@@ -232,6 +234,7 @@ Contextf::Contextf(const char *format, ...) {
c.errctx = fmt::vsprintf(format, argp);
c.errctx = fmt::vsprintf(format, argp);
va_end(argp);
va_end(argp);
}
}
#endif
error
Contextf
::
operator
()
(
error
err
)
const
{
error
Contextf
::
operator
()
(
error
err
)
const
{
const
Contextf
&
c
=
*
this
;
const
Contextf
&
c
=
*
this
;
...
...
wcfs/client/wcfs_misc.h
View file @
f7b54ca4
...
@@ -146,6 +146,8 @@ typedef uint64_t Oid;
...
@@ -146,6 +146,8 @@ typedef uint64_t Oid;
}
// zodb::
}
// zodb::
#include <golang/fmt.h>
// xerr::
// xerr::
namespace
xerr
{
namespace
xerr
{
...
@@ -164,11 +166,16 @@ class Contextf {
...
@@ -164,11 +166,16 @@ class Contextf {
string
errctx
;
string
errctx
;
public:
public:
Contextf
(
const
char
*
format
,
...);
template
<
typename
...
Argv
>
inline
Contextf
(
const
char
*
format
,
Argv
...
argv
)
{
// XXX string() to avoid "error: format not a string literal" given by -Werror=format-security
errctx
=
fmt
::
sprintf
(
string
(
format
),
argv
...);
}
error
operator
()
(
error
)
const
;
error
operator
()
(
error
)
const
;
};
};
}
}
// xerr::
// wcfs::
// wcfs::
...
...
Kirill Smelkov
@kirr
mentioned in commit
6f0cdaff
·
Oct 28, 2021
mentioned in commit
6f0cdaff
mentioned in commit 6f0cdaff23d4f8c3384b74b02d669c7fcfc2d821
Toggle commit list
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