Removed some compiler warnings

SQLiteServer
René Cannaò 10 years ago
parent 224c8d05e4
commit 896a98bf46

@ -1343,8 +1343,10 @@ __exit_DSS__STATE_NOT_INITIALIZED:
if (mybe && mybe->server_myds) {
if (mybe->server_myds->DSS > STATE_MARIADB_BEGIN && mybe->server_myds->DSS < STATE_MARIADB_END) {
#ifdef DEBUG
MySQL_Data_Stream *myds=mybe->server_myds;
MySQL_Connection *myconn=mybe->server_myds->myconn;
#endif /* DEBUG */
proxy_debug(PROXY_DEBUG_MYSQL_CONNECTION, 5, "Sess=%p, status=%d, server_myds->DSS==%d , revents==%d , async_state_machine=%d\n", this, status, mybe->server_myds->DSS, myds->revents, myconn->async_state_machine);
} else {

@ -1576,7 +1576,9 @@ void MySQL_Thread::run() {
if (myds==NULL) {
if (mypolls.fds[n].revents) {
unsigned char c;
read(mypolls.fds[n].fd, &c, 1); // read just one byte , no need for error handling
if (read(mypolls.fds[n].fd, &c, 1)==-1) {// read just one byte
proxy_error("Error during read from signal_all_threads()\n");
}
proxy_debug(PROXY_DEBUG_GENERIC,3, "Got signal from admin , done nothing\n");
//fprintf(stderr,"Got signal from admin , done nothing\n"); // FIXME: this is just the scheleton for issue #253
if (c) {
@ -2191,7 +2193,9 @@ void MySQL_Threads_Handler::signal_all_threads(unsigned char _c) {
for (i=0;i<num_threads;i++) {
MySQL_Thread *thr=(MySQL_Thread *)mysql_threads[i].worker;
int fd=thr->pipefd[1];
write(fd,&c,1);
if (write(fd,&c,1)==-1) {
proxy_error("Error during write in signal_all_threads()\n");
}
}
}

@ -9,8 +9,10 @@
#endif /* DEBUG_EXTERN */
#endif /* DEBUG */
#ifdef DEBUG
static unsigned long long pretime=0;
static spinlock debug_spinlock;
#endif /* DEBUG */
static inline unsigned long long debug_monotonic_time() {
struct timespec ts;

@ -701,7 +701,9 @@ handler_again:
void MySQL_Connection::next_event(MDB_ASYNC_ST new_st) {
#ifdef DEBUG
int fd;
#endif /* DEBUG */
wait_events=0;
if (async_exit_status & MYSQL_WAIT_READ)
@ -709,9 +711,15 @@ void MySQL_Connection::next_event(MDB_ASYNC_ST new_st) {
if (async_exit_status & MYSQL_WAIT_WRITE)
wait_events|= POLLOUT;
if (wait_events)
#ifdef DEBUG
fd= mysql_get_socket(mysql);
#else
mysql_get_socket(mysql);
#endif /* DEBUG */
else
#ifdef DEBUG
fd= -1;
#endif /* DEBUG */
if (async_exit_status & MYSQL_WAIT_TIMEOUT) {
timeout=10000;
//tv.tv_sec= 0;

Loading…
Cancel
Save