All warnings removed.

Minimal changes to remove warnings when compiling.
This commit is contained in:
Johan Wikman 2015-09-25 14:07:19 +03:00
parent 1e694a6c7d
commit 9efad8727a
4 changed files with 10 additions and 10 deletions

View File

@ -1670,7 +1670,7 @@ int main(int argc, char **argv)
if(!daemon_mode)
{
strncat(errorbuffer, "\n", STRING_BUFFER_SIZE);
fprintf(stderr, errorbuffer);
fprintf(stderr, "%s", errorbuffer);
}
rc = MAXSCALE_BADCONFIG;

View File

@ -67,7 +67,7 @@ int
main()
{
MEMLOG *log, *log2;
int i;
long int i;
long j;
long long k;
int failures = 0;

View File

@ -151,11 +151,14 @@ test3_helper(void *data)
// SPINLOCK *lck = (SPINLOCK *)data;
int i;
int n = *(int *)data;
struct timespec sleeptime;
time_t rawtime;
#if defined(ADD_SOME_NANOSLEEP)
struct timespec sleeptime;
sleeptime.tv_sec = 0;
sleeptime.tv_nsec = 1;
#endif
while (1) {
if (spinlock_acquire_nowait(&lck)) {
@ -185,7 +188,9 @@ time_t rawtime;
active = 0;
spinlock_release(&lck);
for (i=0; i<(4*PROCESS_LOOP); i++);
// nanosleep(&sleeptime, NULL);
#if defined(ADD_SOME_NANOSLEEP)
nanosleep(&sleeptime, NULL);
#endif
}
spinlock_release(&lck);
}
@ -199,11 +204,6 @@ int i;
int tnum[THREADS];
time_t rawtime;
struct timespec sleeptime;
sleeptime.tv_sec = 20;
sleeptime.tv_nsec = NANOTIME;
times_run = 0;
active = 0;
failures = 0;

View File

@ -2261,7 +2261,7 @@ char *create_auth_fail_str(
}
else if(errcode == MYSQL_FAILED_AUTH_SSL)
{
sprintf(errstr, ferrstr);
sprintf(errstr, "%s", ferrstr);
}
else
{