summaryrefslogtreecommitdiff
path: root/include/m_string.h
diff options
context:
space:
mode:
authorGuilhem Bichot <guilhem@mysql.com>2008-06-26 17:10:11 +0200
committerGuilhem Bichot <guilhem@mysql.com>2008-06-26 17:10:11 +0200
commitf0c53638d79d73a29bbd35b9765667c5c0f4db16 (patch)
tree24f575ba8249a4276f940c105f1f117beefbb253 /include/m_string.h
parent1d726038324e9ed977b9b1a7d2ebf90ca647db9d (diff)
downloadmariadb-git-f0c53638d79d73a29bbd35b9765667c5c0f4db16.tar.gz
Fixes for build errors under Windows and compiler warning under Linux
include/m_string.h: new macro like LINT_INIT but for struct. In m_string.h because bzero() becomes available only there storage/maria/ma_check.c: compiler error under Windows (declaration after statements...) storage/maria/ma_key.c: trnman.h is not in include/ but in storage/maria storage/maria/ma_sp_key.c: trnman.h is not in include/ but in storage/maria storage/maria/ma_write.c: avoid compiler warning (org_key.flag may be used uninitialized)
Diffstat (limited to 'include/m_string.h')
-rw-r--r--include/m_string.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/m_string.h b/include/m_string.h
index 75734d51360..2fadd11af89 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -134,6 +134,12 @@ extern size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len);
#define bzero_if_purify(A,B)
#endif /* HAVE_purify */
+#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
+#define LINT_INIT_STRUCT(var) bzero(&var, sizeof(var)) /* No uninitialize-warning */
+#else
+#define LINT_INIT_STRUCT(var)
+#endif
+
#ifndef bmove512
extern void bmove512(uchar *dst,const uchar *src,size_t len);
#endif