mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 18:34:13 +08:00
mdbx-tools: more fix MSVC warnings.
Change-Id: Ib5f78a89fea09dc78d4922519eab6eaed4b1a7e6
This commit is contained in:
parent
63af619080
commit
c5d1384c64
@ -18,7 +18,14 @@
|
|||||||
#pragma warning(disable : 4464) /* relative include path contains '..' */
|
#pragma warning(disable : 4464) /* relative include path contains '..' */
|
||||||
#endif
|
#endif
|
||||||
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
||||||
#endif /* _MSC_VER */
|
#if _MSC_VER == 1900
|
||||||
|
/* LY: MSVC 2015 has buggy/inconsistent PRIuPTR/PRIxPTR macros and format-arg
|
||||||
|
checker for size_t typedef. */
|
||||||
|
#pragma warning(disable : 4777) /* format string '%10u' requires an argument \
|
||||||
|
of type 'unsigned int', but variadic \
|
||||||
|
argument 1 has type 'std::size_t' */
|
||||||
|
#endif
|
||||||
|
#endif /* _MSC_VER (warnings) */
|
||||||
|
|
||||||
#include "../bits.h"
|
#include "../bits.h"
|
||||||
|
|
||||||
@ -203,7 +210,7 @@ static void problem_add(const char *object, uint64_t entry_number,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct problem *problems_push() {
|
static struct problem *problems_push(void) {
|
||||||
struct problem *p = problems_list;
|
struct problem *p = problems_list;
|
||||||
problems_list = NULL;
|
problems_list = NULL;
|
||||||
return p;
|
return p;
|
||||||
|
@ -18,7 +18,14 @@
|
|||||||
#pragma warning(disable : 4464) /* relative include path contains '..' */
|
#pragma warning(disable : 4464) /* relative include path contains '..' */
|
||||||
#endif
|
#endif
|
||||||
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
||||||
#endif /* _MSC_VER */
|
#if _MSC_VER == 1900
|
||||||
|
/* LY: MSVC 2015 has buggy/inconsistent PRIuPTR/PRIxPTR macros and format-arg
|
||||||
|
checker for size_t typedef. */
|
||||||
|
#pragma warning(disable : 4777) /* format string '%10u' requires an argument \
|
||||||
|
of type 'unsigned int', but variadic \
|
||||||
|
argument 1 has type 'std::size_t' */
|
||||||
|
#endif
|
||||||
|
#endif /* _MSC_VER (warnings) */
|
||||||
|
|
||||||
#include "../bits.h"
|
#include "../bits.h"
|
||||||
|
|
||||||
|
@ -18,7 +18,14 @@
|
|||||||
#pragma warning(disable : 4464) /* relative include path contains '..' */
|
#pragma warning(disable : 4464) /* relative include path contains '..' */
|
||||||
#endif
|
#endif
|
||||||
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
||||||
#endif /* _MSC_VER */
|
#if _MSC_VER == 1900
|
||||||
|
/* LY: MSVC 2015 has buggy/inconsistent PRIuPTR/PRIxPTR macros and format-arg
|
||||||
|
checker for size_t typedef. */
|
||||||
|
#pragma warning(disable : 4777) /* format string '%10u' requires an argument \
|
||||||
|
of type 'unsigned int', but variadic \
|
||||||
|
argument 1 has type 'std::size_t' */
|
||||||
|
#endif
|
||||||
|
#endif /* _MSC_VER (warnings) */
|
||||||
|
|
||||||
#include "../bits.h"
|
#include "../bits.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -18,7 +18,14 @@
|
|||||||
#pragma warning(disable : 4464) /* relative include path contains '..' */
|
#pragma warning(disable : 4464) /* relative include path contains '..' */
|
||||||
#endif
|
#endif
|
||||||
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
||||||
#endif /* _MSC_VER */
|
#if _MSC_VER == 1900
|
||||||
|
/* LY: MSVC 2015 has buggy/inconsistent PRIuPTR/PRIxPTR macros and format-arg
|
||||||
|
checker for size_t typedef. */
|
||||||
|
#pragma warning(disable : 4777) /* format string '%10u' requires an argument \
|
||||||
|
of type 'unsigned int', but variadic \
|
||||||
|
argument 1 has type 'std::size_t' */
|
||||||
|
#endif
|
||||||
|
#endif /* _MSC_VER (warnings) */
|
||||||
|
|
||||||
#include "../bits.h"
|
#include "../bits.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -18,7 +18,14 @@
|
|||||||
#pragma warning(disable : 4464) /* relative include path contains '..' */
|
#pragma warning(disable : 4464) /* relative include path contains '..' */
|
||||||
#endif
|
#endif
|
||||||
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
#pragma warning(disable : 4996) /* The POSIX name is deprecated... */
|
||||||
#endif /* _MSC_VER */
|
#if _MSC_VER == 1900
|
||||||
|
/* LY: MSVC 2015 has buggy/inconsistent PRIuPTR/PRIxPTR macros and format-arg
|
||||||
|
checker for size_t typedef. */
|
||||||
|
#pragma warning(disable : 4777) /* format string '%10u' requires an argument \
|
||||||
|
of type 'unsigned int', but variadic \
|
||||||
|
argument 1 has type 'std::size_t' */
|
||||||
|
#endif
|
||||||
|
#endif /* _MSC_VER (warnings) */
|
||||||
|
|
||||||
#include "../bits.h"
|
#include "../bits.h"
|
||||||
|
|
||||||
|
@ -20,9 +20,6 @@
|
|||||||
|
|
||||||
#define ERR(s, c) \
|
#define ERR(s, c) \
|
||||||
if (opterr) { \
|
if (opterr) { \
|
||||||
char errbuf[2]; \
|
|
||||||
errbuf[0] = (char)c; \
|
|
||||||
errbuf[1] = '\n'; \
|
|
||||||
fputs(argv[0], stderr); \
|
fputs(argv[0], stderr); \
|
||||||
fputs(s, stderr); \
|
fputs(s, stderr); \
|
||||||
fputc(c, stderr); \
|
fputc(c, stderr); \
|
||||||
@ -38,13 +35,14 @@ int getopt(int argc, char *const argv[], const char *opts) {
|
|||||||
int c;
|
int c;
|
||||||
char *cp;
|
char *cp;
|
||||||
|
|
||||||
if (sp == 1)
|
if (sp == 1) {
|
||||||
if (optind >= argc || argv[optind][0] != '-' || argv[optind][1] == '\0')
|
if (optind >= argc || argv[optind][0] != '-' || argv[optind][1] == '\0')
|
||||||
return EOF;
|
return EOF;
|
||||||
else if (strcmp(argv[optind], "--") == 0) {
|
else if (strcmp(argv[optind], "--") == 0) {
|
||||||
optind++;
|
optind++;
|
||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
optopt = c = argv[optind][sp];
|
optopt = c = argv[optind][sp];
|
||||||
if (c == ':' || (cp = strchr(opts, c)) == NULL) {
|
if (c == ':' || (cp = strchr(opts, c)) == NULL) {
|
||||||
ERR(": illegal option -- ", c);
|
ERR(": illegal option -- ", c);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user