Fri Apr 20 13:53:20 PDT 2007
- Previous message: [Slony1-commit] slony1-engine/tests/testlogship README gen_weak_user.sh generate_dml.sh init_add_tables.ik init_cluster.ik init_create_set.ik init_data.sql init_schema.sql init_subscribe_set.ik schema.diff settings.ik
- Next message: [Slony1-commit] slony1-engine/tests/testlogship README gen_weak_user.sh generate_dml.sh init_add_tables.ik init_cluster.ik init_create_set.ik init_data.sql init_schema.sql init_subscribe_set.ik schema.diff settings.ik
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/slon In directory main.slony.info:/tmp/cvs-serv31945/slon Modified Files: cleanup_thread.c confoptions.c confoptions.h local_listen.c misc.c remote_listen.c remote_worker.c slon.c slon.h Log Message: Add a whole bunch of type annotations to CVS HEAD in order to silence Splint (<http://splint.org/>) warnings. Index: remote_listen.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_listen.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** remote_listen.c 18 Apr 2007 22:19:07 -0000 1.34 --- remote_listen.c 20 Apr 2007 20:53:18 -0000 1.35 *************** *** 153,157 **** if (node->listen_status == SLON_TSTAT_NONE || node->listen_status == SLON_TSTAT_SHUTDOWN || ! !node->no_active) { rtcfg_unlock(); --- 153,157 ---- if (node->listen_status == SLON_TSTAT_NONE || node->listen_status == SLON_TSTAT_SHUTDOWN || ! !((bool) node->no_active)) { rtcfg_unlock(); *************** *** 485,489 **** lnode = rtcfg_findNode(listat->li_origin); if (lnode != NULL && lnode->no_active) ! found = true; break; } --- 485,489 ---- lnode = rtcfg_findNode(listat->li_origin); if (lnode != NULL && lnode->no_active) ! found = (int) true; break; } Index: local_listen.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slon/local_listen.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** local_listen.c 18 Apr 2007 22:19:07 -0000 1.40 --- local_listen.c 20 Apr 2007 20:53:18 -0000 1.41 *************** *** 36,40 **** */ void * ! localListenThread_main(void *dummy) { SlonConn *conn; --- 36,40 ---- */ void * ! localListenThread_main(/* @unused@ */ void *dummy) { SlonConn *conn; Index: misc.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slon/misc.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** misc.c 18 Apr 2007 22:19:07 -0000 1.24 --- misc.c 20 Apr 2007 20:53:18 -0000 1.25 *************** *** 158,162 **** ) { ! len = strftime(time_buf, sizeof(time_buf), log_timestamp_format, localtime(&stamp_time)); if (len == 0 && time_buf[0] != '\0') { perror("slon_log: problem with strftime()"); --- 158,162 ---- ) { ! len = (int) strftime(time_buf, sizeof(time_buf), log_timestamp_format, localtime(&stamp_time)); if (len == 0 && time_buf[0] != '\0') { perror("slon_log: problem with strftime()"); Index: remote_worker.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slon/remote_worker.c,v retrieving revision 1.137 retrieving revision 1.138 diff -C2 -d -r1.137 -r1.138 *** remote_worker.c 18 Apr 2007 22:19:07 -0000 1.137 --- remote_worker.c 20 Apr 2007 20:53:18 -0000 1.138 *************** *** 213,217 **** static struct node_confirm_status *node_confirm_head = NULL; static struct node_confirm_status *node_confirm_tail = NULL; ! pthread_mutex_t node_confirm_lock = PTHREAD_MUTEX_INITIALIZER; int sync_group_maxsize; --- 213,217 ---- static struct node_confirm_status *node_confirm_head = NULL; static struct node_confirm_status *node_confirm_tail = NULL; ! static pthread_mutex_t node_confirm_lock = PTHREAD_MUTEX_INITIALIZER; int sync_group_maxsize; *************** *** 219,231 **** int sync_max_largemem; ! int last_sync_group_size; ! int next_sync_group_size; int desired_sync_time; ! int ideal_sync; ! struct timeval sync_start; ! struct timeval sync_end; ! int last_sync_length; ! int max_sync; int min_sync; int quit_sync_provider; --- 219,231 ---- int sync_max_largemem; ! static int last_sync_group_size; ! static int next_sync_group_size; int desired_sync_time; ! static int ideal_sync; ! static struct timeval sync_start; ! static struct timeval sync_end; ! static int last_sync_length; ! static int max_sync; int min_sync; int quit_sync_provider; Index: slon.h =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slon/slon.h,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** slon.h 18 Apr 2007 22:19:07 -0000 1.62 --- slon.h 20 Apr 2007 20:53:18 -0000 1.63 *************** *** 410,414 **** #endif - extern void slon_exit(int code); extern void Usage(char *const argv[]); --- 410,413 ---- Index: confoptions.h =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slon/confoptions.h,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** confoptions.h 18 Apr 2007 22:19:07 -0000 1.34 --- confoptions.h 20 Apr 2007 20:53:18 -0000 1.35 *************** *** 8,13 **** void *get_config_option(const char *name); - extern double real_placeholder; - extern char *rtcfg_cluster_name; extern char *rtcfg_conninfo; --- 8,11 ---- Index: slon.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slon/slon.c,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** slon.c 18 Apr 2007 22:19:07 -0000 1.71 --- slon.c 20 Apr 2007 20:53:18 -0000 1.72 *************** *** 58,61 **** --- 58,62 ---- * ---------- */ + static void slon_exit(int code); static pthread_t local_event_thread; static pthread_t local_cleanup_thread; *************** *** 789,793 **** #ifndef CYGWIN act.sa_handler = &sighandler; ! sigemptyset(&act.sa_mask); act.sa_flags = SA_NODEFER; --- 790,794 ---- #ifndef CYGWIN act.sa_handler = &sighandler; ! (void) sigemptyset(&act.sa_mask); act.sa_flags = SA_NODEFER; *************** *** 852,861 **** slon_log(SLON_DEBUG2, "slon: child terminated status: %d; pid: %d, current worker pid: %d\n", child_status, pid, slon_worker_pid); ! alarm(0); switch (watchdog_status) { case SLON_WATCHDOG_RESTART: ! execvp(main_argv[0], main_argv); slon_log(SLON_FATAL, "slon: cannot restart via execvp() - %s\n", strerror(errno)); --- 853,862 ---- slon_log(SLON_DEBUG2, "slon: child terminated status: %d; pid: %d, current worker pid: %d\n", child_status, pid, slon_worker_pid); ! (void) alarm(0); switch (watchdog_status) { case SLON_WATCHDOG_RESTART: ! (void) execvp(main_argv[0], main_argv); slon_log(SLON_FATAL, "slon: cannot restart via execvp() - %s\n", strerror(errno)); *************** *** 869,873 **** { slon_log(SLON_DEBUG1, "slon: restart of worker in 10 seconds\n"); ! sleep(10); } else --- 870,874 ---- { slon_log(SLON_DEBUG1, "slon: restart of worker in 10 seconds\n"); ! (void) sleep(10); } else *************** *** 877,881 **** if (watchdog_status == SLON_WATCHDOG_RETRY) { ! execvp(main_argv[0], main_argv); slon_log(SLON_FATAL, "slon: cannot restart via execvp() - %s\n", strerror(errno)); --- 878,882 ---- if (watchdog_status == SLON_WATCHDOG_RETRY) { ! (void) execvp(main_argv[0], main_argv); slon_log(SLON_FATAL, "slon: cannot restart via execvp() - %s\n", strerror(errno)); *************** *** 953,962 **** { slon_log(SLON_FATAL, "main: write to worker pipe failed -(%d) %s\n", errno, strerror(errno)); ! kill(slon_worker_pid, SIGKILL); slon_exit(-1); } ! close(sched_wakeuppipe[0]); ! close(sched_wakeuppipe[1]); ! alarm(20); } #endif --- 954,963 ---- { slon_log(SLON_FATAL, "main: write to worker pipe failed -(%d) %s\n", errno, strerror(errno)); ! (void) kill(slon_worker_pid, SIGKILL); slon_exit(-1); } ! (void) close(sched_wakeuppipe[0]); ! (void) close(sched_wakeuppipe[1]); ! (void) alarm(20); } #endif *************** *** 966,970 **** * ---------- */ ! void slon_exit(int code) { --- 967,971 ---- * ---------- */ ! static void slon_exit(int code) { *************** *** 977,981 **** { slon_log(SLON_DEBUG2, "slon: remove pid file\n"); ! unlink(pid_file); } --- 978,982 ---- { slon_log(SLON_DEBUG2, "slon: remove pid file\n"); ! (void) unlink(pid_file); } Index: cleanup_thread.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slon/cleanup_thread.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** cleanup_thread.c 18 Apr 2007 22:19:07 -0000 1.36 --- cleanup_thread.c 20 Apr 2007 20:53:18 -0000 1.37 *************** *** 60,68 **** * ---------- */ - /* @ -paramuse @ */ void * ! cleanupThread_main(void *dummy) { - /* @ +paramuse @ */ SlonConn *conn; SlonDString query1; --- 60,66 ---- * ---------- */ void * ! cleanupThread_main(/*@unused@*/ void *dummy) { SlonConn *conn; SlonDString query1; *************** *** 408,412 **** dstring_init(&query1); ! slon_mkquery(&query1, "select %s.getMinXid();", rtcfg_namespace); res = PQexec(dbconn, dstring_data(&query1)); if (PQresultStatus(res) != PGRES_TUPLES_OK) --- 406,410 ---- dstring_init(&query1); ! (void) slon_mkquery(&query1, "select %s.getMinXid();", rtcfg_namespace); res = PQexec(dbconn, dstring_data(&query1)); if (PQresultStatus(res) != PGRES_TUPLES_OK) *************** *** 415,419 **** PQclear(res); slon_retry(); ! return -1; } xid = strtoll(PQgetvalue(res, 0, 0), NULL, 10); --- 413,417 ---- PQclear(res); slon_retry(); ! return (unsigned long) -1; } xid = strtoll(PQgetvalue(res, 0, 0), NULL, 10); Index: confoptions.c =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/slon/confoptions.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** confoptions.c 18 Apr 2007 22:19:07 -0000 1.22 --- confoptions.c 20 Apr 2007 20:53:18 -0000 1.23 *************** *** 18,24 **** void *get_config_option(const char *name); ! bool bool_placeholder; ! double real_placeholder; ! char *string_placeholder; --- 18,24 ---- void *get_config_option(const char *name); ! static bool bool_placeholder; ! static double real_placeholder; ! static char *string_placeholder;
- Previous message: [Slony1-commit] slony1-engine/tests/testlogship README gen_weak_user.sh generate_dml.sh init_add_tables.ik init_cluster.ik init_create_set.ik init_data.sql init_schema.sql init_subscribe_set.ik schema.diff settings.ik
- Next message: [Slony1-commit] slony1-engine/tests/testlogship README gen_weak_user.sh generate_dml.sh init_add_tables.ik init_cluster.ik init_create_set.ik init_data.sql init_schema.sql init_subscribe_set.ik schema.diff settings.ik
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list