summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <mskold@mysql.com>2004-09-15 19:00:23 +0200
committerunknown <mskold@mysql.com>2004-09-15 19:00:23 +0200
commit53e85a275b08370e874f1866b572edd0dcc36687 (patch)
tree50f419bc0d32a2f8e9ce5c96ebbba135220e9700
parentf955763fb368e592f807e0953be89a575228df5f (diff)
downloadmariadb-git-53e85a275b08370e874f1866b572edd0dcc36687.tar.gz
Fixed compiler warnings
-rw-r--r--ndb/src/common/debugger/DebuggerNames.cpp6
-rw-r--r--ndb/src/common/logger/SysLogHandler.cpp2
-rw-r--r--ndb/src/common/portlib/NdbTCP.cpp2
-rw-r--r--ndb/src/common/util/getarg.c6
-rw-r--r--ndb/src/common/util/random.c6
-rw-r--r--ndb/src/common/util/version.c2
-rw-r--r--ndb/src/ndbapi/NdbRecAttr.cpp2
7 files changed, 13 insertions, 13 deletions
diff --git a/ndb/src/common/debugger/DebuggerNames.cpp b/ndb/src/common/debugger/DebuggerNames.cpp
index 2142138e435..b2a79e2385b 100644
--- a/ndb/src/common/debugger/DebuggerNames.cpp
+++ b/ndb/src/common/debugger/DebuggerNames.cpp
@@ -29,7 +29,7 @@ static const char * localBlockNames[NO_OF_BLOCKS];
static
int
initSignalNames(const char * dst[], const GsnName src[], unsigned short len){
- int i;
+ unsigned i;
for(i = 0; i<=MAX_GSN; i++)
dst[i] = 0;
@@ -55,7 +55,7 @@ int
initSignalPrinters(SignalDataPrintFunction dst[],
const NameFunctionPair src[],
unsigned short len){
- int i;
+ unsigned i;
for(i = 0; i<=MAX_GSN; i++)
dst[i] = 0;
@@ -81,7 +81,7 @@ int
initBlockNames(const char * dst[],
const BlockName src[],
unsigned len){
- int i;
+ unsigned i;
for(i = 0; i<NO_OF_BLOCKS; i++)
dst[i] = 0;
diff --git a/ndb/src/common/logger/SysLogHandler.cpp b/ndb/src/common/logger/SysLogHandler.cpp
index a300c487eb9..5b1b8d85ca7 100644
--- a/ndb/src/common/logger/SysLogHandler.cpp
+++ b/ndb/src/common/logger/SysLogHandler.cpp
@@ -113,7 +113,7 @@ SysLogHandler::setParam(const BaseString &param, const BaseString &value) {
}
static const struct syslog_facility {
- char *name;
+ const char *name;
int value;
} facilitynames[] = {
{ "auth", LOG_AUTH },
diff --git a/ndb/src/common/portlib/NdbTCP.cpp b/ndb/src/common/portlib/NdbTCP.cpp
index 4bf4936aa30..a3d91f9c7b1 100644
--- a/ndb/src/common/portlib/NdbTCP.cpp
+++ b/ndb/src/common/portlib/NdbTCP.cpp
@@ -39,7 +39,7 @@ Ndb_getInAddr(struct in_addr * dst, const char *address) {
/* Try it as aaa.bbb.ccc.ddd. */
dst->s_addr = inet_addr(address);
- if (dst->s_addr != -1) {
+ if (dst->s_addr != INADDR_NONE) {
return 0;
}
return -1;
diff --git a/ndb/src/common/util/getarg.c b/ndb/src/common/util/getarg.c
index ae016746987..99b2840a5a6 100644
--- a/ndb/src/common/util/getarg.c
+++ b/ndb/src/common/util/getarg.c
@@ -494,7 +494,7 @@ arg_match_short (struct getargs *args, size_t num_args,
optarg = &argv[j + 1];
else {
++*optind;
- optarg = rargv[*optind];
+ optarg = (char *) rargv[*optind];
}
if(optarg == NULL) {
--*optind;
@@ -545,10 +545,10 @@ getarg(struct getargs *args, size_t num_args,
i++;
break;
}
- ret = arg_match_long (args, num_args, argv[i] + 2,
+ ret = arg_match_long (args, num_args, (char *) argv[i] + 2,
argc, argv, &i);
} else {
- ret = arg_match_short (args, num_args, argv[i],
+ ret = arg_match_short (args, num_args, (char *) argv[i],
argc, argv, &i);
}
if(ret)
diff --git a/ndb/src/common/util/random.c b/ndb/src/common/util/random.c
index 286ab093a26..21235763793 100644
--- a/ndb/src/common/util/random.c
+++ b/ndb/src/common/util/random.c
@@ -154,8 +154,8 @@ static void localRandom48(DRand48Data *buffer, long int *result)
static void shuffleSequence(RandomSequence *seq)
{
- int i;
- int j;
+ unsigned int i;
+ unsigned int j;
unsigned int tmp;
if( !seq ) return;
@@ -254,7 +254,7 @@ unsigned int getNextRandom(RandomSequence *seq)
void printSequence(RandomSequence *seq, unsigned int numPerRow)
{
- int i;
+ unsigned int i;
if( !seq ) return;
diff --git a/ndb/src/common/util/version.c b/ndb/src/common/util/version.c
index 10f621d5db8..937ca1d32dd 100644
--- a/ndb/src/common/util/version.c
+++ b/ndb/src/common/util/version.c
@@ -135,7 +135,7 @@ ndbSearchUpgradeCompatibleTable(Uint32 ownVersion, Uint32 otherVersion,
int i;
for (i = 0; table[i].ownVersion != 0 && table[i].otherVersion != 0; i++) {
if (table[i].ownVersion == ownVersion ||
- table[i].ownVersion == ~0) {
+ table[i].ownVersion == (Uint32) ~0) {
switch (table[i].matchType) {
case UG_Range:
if (otherVersion >= table[i].otherVersion){
diff --git a/ndb/src/ndbapi/NdbRecAttr.cpp b/ndb/src/ndbapi/NdbRecAttr.cpp
index 2e753f13006..bcd91292fcd 100644
--- a/ndb/src/ndbapi/NdbRecAttr.cpp
+++ b/ndb/src/ndbapi/NdbRecAttr.cpp
@@ -230,7 +230,7 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r)
}
break;
default: /* no print functions for the rest, just print type */
- out << r.getType();
+ out << (int) r.getType();
j = r.arraySize();
if (j > 1)
out << " " << j << " times";