search for: __format__

Displaying 20 results from an estimated 20 matches for "__format__".

2020 Mar 26
0
[PATCH nbdkit 2/9] server: Rename replacement vfprintf function.
....h index e39db8a8..e5c7f514 100644 --- a/server/internal.h +++ b/server/internal.h @@ -298,16 +298,18 @@ extern void apply_debug_flags (void *dl, const char *name); extern void free_debug_flags (void); /* log-*.c */ +extern void log_stderr_verror (const char *fs, va_list args) + __attribute__((__format__ (printf, 1, 0))); +extern void log_syslog_verror (const char *fs, va_list args) + __attribute__((__format__ (printf, 1, 0))); + +/* vfprintf.c */ #if !HAVE_VFPRINTF_PERCENT_M #include <stdio.h> -#define vfprintf nbdkit_vfprintf -extern int nbdkit_vfprintf (FILE *f, const char *fmt, va_list...
2019 Jan 02
0
[PATCH nbdkit v2 2/2] include: Only use attribute((format)) on GCC or Clang.
.../nbdkit-common.h b/include/nbdkit-common.h index 27f6ed1..36fce20 100644 --- a/include/nbdkit-common.h +++ b/include/nbdkit-common.h @@ -45,6 +45,13 @@ extern "C" { #endif +#if defined(__GNUC__) || defined(__clang__) +#define ATTRIBUTE_FORMAT_PRINTF(fmtpos, argpos) \ + __attribute__((__format__ (__printf__, fmtpos, argpos))) +#else +#define ATTRIBUTE_FORMAT_PRINTF(fmtpos, argpos) +#endif + #define NBDKIT_THREAD_MODEL_SERIALIZE_CONNECTIONS 0 #define NBDKIT_THREAD_MODEL_SERIALIZE_ALL_REQUESTS 1 #define NBDKIT_THREAD_MODEL_SERIALIZE_REQUESTS 2 @@ -57,11 +64,9 @@ extern &quot...
2018 Jan 23
3
[nbdkit PATCH 0/2] Miscellaneous patches
These are relatively independent enough from my ongoing work to add FUA support that I'll post them now. Eric Blake (2): todo: More items include: Properly decorate attributes in public headers TODO | 15 ++++++++++++++- include/nbdkit-common.h | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) -- 2.14.3
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Handle embedded NULs correctly in printf
...memout; extern struct output *out1; extern struct output *out2; +void outmem(const char *, size_t, struct output *); void outstr(const char *, struct output *); #ifndef USE_GLIBC_STDIO void outcslow(int, struct output *); @@ -75,6 +76,7 @@ void out1fmt(const char *, ...) __attribute__((__format__(__printf__,1,2))); int fmtstr(char *, size_t, const char *, ...) __attribute__((__format__(__printf__,3,4))); +int xasprintf(char **, const char *, ...); #ifndef USE_GLIBC_STDIO void doformat(struct output *, const char *, va_list); #endif @@ -115,6 +117,7 @@ static inline void outc(int ch...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Handle embedded NULs correctly in printf
...memout; extern struct output *out1; extern struct output *out2; +void outmem(const char *, size_t, struct output *); void outstr(const char *, struct output *); #ifndef USE_GLIBC_STDIO void outcslow(int, struct output *); @@ -75,6 +76,7 @@ void out1fmt(const char *, ...) __attribute__((__format__(__printf__,1,2))); int fmtstr(char *, size_t, const char *, ...) __attribute__((__format__(__printf__,3,4))); +int xasprintf(char **, const char *, ...); #ifndef USE_GLIBC_STDIO void doformat(struct output *, const char *, va_list); #endif @@ -115,6 +117,7 @@ static inline void outc(int ch...
2020 Mar 26
0
[PATCH nbdkit 3/9] server: Add log_verror function.
...dd_debug_flag (const char *arg); extern void apply_debug_flags (void *dl, const char *name); extern void free_debug_flags (void); +/* log.c */ +extern void log_verror (const char *fs, va_list args); + /* log-*.c */ extern void log_stderr_verror (const char *fs, va_list args) __attribute__((__format__ (printf, 1, 0))); diff --git a/server/log.c b/server/log.c index 73493563..37de3dd2 100644 --- a/server/log.c +++ b/server/log.c @@ -40,11 +40,11 @@ #include "internal.h" -/* Call the right nbdkit_verror function depending on log_sink. +/* Call the right log_*_verror function dependi...
2010 Sep 20
0
No subject
...twork traffic information */ + DEBUG_PACKET =3D 32, /* Show contents of each packet that is being = sent/received */ + DEBUG_SCARY_THINGS =3D 64 - 1 /* You have been warned */ } debug_t; =20 typedef enum logmode_t { @@ -50,6 +50,6 @@ extern void logger(int, const char *, ...) __attribute__ = ((__format__(printf, 2, 3))); extern void closelogger(void); =20 -#define ifdebug(l) if(debug_level >=3D DEBUG_##l) +#define ifdebug(l) if(debug_level & DEBUG_##l) =20 #endif /* __TINC_LOGGER_H__ */ ------=_NextPart_000_0001_01CBAE62.CE89B370--
2016 Feb 13
4
[Bug 2540] New: Adds xstrndup() to xmalloc.h/xmalloc.c in OpenSSH 7.x
...xmalloc.h 2016-02-13 09:16:24.760347010 -0800 @@ -20,6 +20,7 @@ void *xcalloc(size_t, size_t); void *xreallocarray(void *, size_t, size_t); char *xstrdup(const char *); +char *xstrndup(const char *, size_t); int xasprintf(char **, const char *, ...) __attribute__((__format__ (printf, 2, 3))) __attribute__((__nonnull__ (2))); ======================================================================= --- xmalloc.c.orig 2016-02-13 09:33:10.108121542 -0800 +++ xmalloc.c 2016-02-13 09:34:07.203378056 -0800 @@ -79,6 +79,20 @@ return cp; } +ch...
2019 Jan 02
4
[PATCH nbdkit v2 0/2] Use of attribute(()).
v1 was here: https://www.redhat.com/archives/libguestfs/2019-January/msg00008.html In v2 I have provided two patches: The first patch extends attribute((nonnull)) to most internal functions, but not to the external API. The second patch uses a macro so that attribute((format)) is only used in the public API on GCC or Clang. At least in theory these headers could be used by a C compiler which
2019 Jan 22
2
Newbie - SNMP-UPS Driver Issue
...s/deantrasente/Documents/GitHub/nut/drivers/snmp-ups.c:38: In file included from /Users/deantrasente/Documents/GitHub/nut/drivers/main.h:4: In file included from /Users/deantrasente/Documents/GitHub/nut/include/common.h:45: /Users/deantrasente/Documents/GitHub/nut/include/proto.h:44:18: error: '__format__' attribute parameter 2 is out of bounds __attribute__ ((__format__ (__printf__, 3, 4))); ^ ~ /Users/deantrasente/Documents/GitHub/nut/include/proto.h:43:5: error: conflicting types for '__builtin___snprintf_chk' int snprintf (char *s...
2019 Jan 01
3
[PATCH nbdkit] include: Annotate function parameters with attribute((nonnull)).
Should we use attribute((nonnull)) at all? There's a very interesting history of this in libvirt -- try looking at commit eefb881 plus the commits referencing eefb881 -- but it does seem to work for me using recent GCC and Clang. I only did a few functions because annotating them gets old quickly... Rich.
2020 Mar 26
15
[PATCH nbdkit 0/9] Create libnbdkit.so
This creates libnbdkit.so as discussed in the following thread: https://www.redhat.com/archives/libguestfs/2020-March/thread.html#00203 test-delay-shutdown.sh fails for unclear reasons. This series starts by reverting "tests: Don't strand hung nbdkit processes" which is because several other tests fail randomly unless I revert this patch. I didn't investigate this yet so it
2007 May 25
0
Patch -- SVN revision in the version string
...=================== --- include/common.h (revision 916) +++ include/common.h (working copy) @@ -86,6 +86,7 @@ /* Return the alternate path for pid files */ const char * altpidpath(void); +const char *upsversion(void); void upslog_with_errno(int priority, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); void upslogx(int priority, const char *fmt, ...) Index: server/netget.c =================================================================== --- server/netget.c (revision 916) +++ server/netget.c (working copy) @@ -165,13 +165,13 @@ sendback(client, "VAR %s server.info...
2019 Aug 30
0
[nbdkit PATCH 2/9] server: Consolidate common backend tasks into new backend.c
...kend.c diff --git a/server/internal.h b/server/internal.h index a9692bbc..3af6ca16 100644 --- a/server/internal.h +++ b/server/internal.h @@ -242,6 +242,7 @@ extern void log_stderr_verror (const char *fs, va_list args) extern void log_syslog_verror (const char *fs, va_list args) __attribute__((__format__ (printf, 1, 0))); +/* backend.c */ struct backend { /* Next filter or plugin in the chain. This is always NULL for * plugins and never NULL for filters. @@ -255,9 +256,18 @@ struct backend { */ size_t i; + /* A copy of the backend name that survives a dlclose. */ + char *name; +...
2007 Jan 23
2
Re: [nut-commits] svn commit r731
...*get_ups_ptr(const char *upsname); > int ups_available(const upstype *ups, ctype *client); > > +void listen_add(const char *addr, const char *port); > + > void kick_login_clients(const char *upsname); > int sendback(ctype *client, const char *fmt, ...) > __attribute__ ((__format__ (__printf__, 2, 3))); > > Modified: trunk/server/upstype.h > ============================================================================== > --- trunk/server/upstype.h (original) > +++ trunk/server/upstype.h Sat Jan 13 21:22:28 2007 > @@ -46,4 +46,6 @@ > void *next; > }...
2020 Mar 26
9
[PATCH nbdkit 5/9 patch split 1/5] Create libnbdkit.so.
This is the previous 5/9 patch posted earlier today, split into reviewable chunks. This passes bisection with -x 'make && make check', but I didn't work very hard on the commit messages, so I refer you back to the original patch to explain how it works: https://www.redhat.com/archives/libguestfs/2020-March/msg00248.html Rich.
2012 Nov 29
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
I have a new problem: Register RBP is used in a function foo. (I am not allocating RBP to any virtual register, the instances of RBP in function foo are in the machine code when my register allocator starts.) Function foo calls function bar. Register RBP is not saved across the call, though it is live after the call. Function bar includes a virtual register. The code that I'm using to
2012 Dec 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...xtern int vsprintf (char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)); extern int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); extern int fscanf (FILE *__restrict __stream, __const char...
2018 Mar 08
19
[nbdkit PATCH v3 00/15] Add FUA support to nbdkit
After more than a month since v2 [1], I've finally got my FUA support series polished. This is all of my outstanding patches, even though some of them were originally posted in separate threads from the original FUA post [2], [3] [1] https://www.redhat.com/archives/libguestfs/2018-January/msg00113.html [2] https://www.redhat.com/archives/libguestfs/2018-January/msg00219.html [3]
2019 Aug 30
15
[nbdkit PATCH 0/9] can_FOO caching, more filter validation
It's easy to use the sh script to demonstrate that nbdkit is inefficiently calling into .get_size, .can_fua, and friends more than necessary. We've also commented on the list in the past that it would be nice to ensure that when filters call into next_ops, they are not violating constraints (as we've have to fix several bugs in the past where we did not have such checking to protect