Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7810/nsd Modified Files: conn.c info.c log.c queue.c tclfile.c tclhttp.c tclinit.c tcljob.c tclmisc.c tclthread.c tclvar.c Log Message: Silence "dereferencing type-punned pointer will break strict-aliasing rules" types of warnings Index: tclmisc.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclmisc.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tclmisc.c 10 Jun 2005 17:58:40 -0000 1.7 --- tclmisc.c 12 Jun 2005 14:42:44 -0000 1.8 *************** *** 430,433 **** --- 430,434 ---- NsTclTimeObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj **objv) { + int opt; Ns_Time result, t1, t2; static CONST char *opts[] = { *************** *** 438,442 **** TAdjustIdx, TDiffIdx, TGetIdx, TIncrIdx, TMakeIdx, TSecondsIdx, TMicroSecondsIdx ! } opt; if (objc < 2) { --- 439,443 ---- TAdjustIdx, TDiffIdx, TGetIdx, TIncrIdx, TMakeIdx, TSecondsIdx, TMicroSecondsIdx ! }; if (objc < 2) { *************** *** 444,448 **** } else { if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! (int *) &opt) != TCL_OK) { return TCL_ERROR; } --- 445,449 ---- } else { if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! &opt) != TCL_OK) { return TCL_ERROR; } Index: info.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/info.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** info.c 10 Jun 2005 17:58:39 -0000 1.6 --- info.c 12 Jun 2005 14:42:44 -0000 1.7 *************** *** 478,481 **** --- 478,482 ---- NsTclInfoObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv) { + int opt; NsInterp *itPtr = arg; char *elog; *************** *** 496,500 **** sockICallbacksIdx, ITagIdx, ITclLibIdx, IThreadsIdx, IUptimeIdx, IVersionIdx, IWinntIdx, IFiltersIdx, ITracesIdx, IRequestProcsIdx, ! } opt; if (objc != 2) { --- 497,501 ---- sockICallbacksIdx, ITagIdx, ITclLibIdx, IThreadsIdx, IUptimeIdx, IVersionIdx, IWinntIdx, IFiltersIdx, ITracesIdx, IRequestProcsIdx, ! }; if (objc != 2) { *************** *** 503,507 **** } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! (int *) &opt) != TCL_OK) { return TCL_ERROR; } --- 504,508 ---- } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! &opt) != TCL_OK) { return TCL_ERROR; } Index: conn.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/conn.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** conn.c 10 Jun 2005 20:53:13 -0000 1.15 --- conn.c 12 Jun 2005 14:42:44 -0000 1.16 *************** *** 923,927 **** FormFile *filePtr; Ns_DString ds; ! int idx, off, len; static CONST char *opts[] = { --- 923,927 ---- FormFile *filePtr; Ns_DString ds; ! int idx, off, len, opt; static CONST char *opts[] = { *************** *** 944,948 **** CServerIdx, CSockIdx, CStartIdx, CStatusIdx, CUrlIdx, CUrlcIdx, CUrlEncodingIdx, CUrlvIdx, CVersionIdx, CWriteEncodedIdx ! } opt; if (objc < 2) { --- 944,948 ---- CServerIdx, CSockIdx, CStartIdx, CStatusIdx, CUrlIdx, CUrlcIdx, CUrlEncodingIdx, CUrlvIdx, CVersionIdx, CWriteEncodedIdx ! }; if (objc < 2) { *************** *** 951,955 **** } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! (int *) &opt) != TCL_OK) { return TCL_ERROR; } --- 951,955 ---- } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! &opt) != TCL_OK) { return TCL_ERROR; } Index: tcljob.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tcljob.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcljob.c 10 Jun 2005 20:53:13 -0000 1.5 --- tcljob.c 12 Jun 2005 14:42:44 -0000 1.6 *************** *** 358,362 **** Queue *queuePtr = NULL; Job *jobPtr = NULL, **nextPtrPtr; ! int code, new, create = 0, max; char *jobId = NULL, buf[100], *queueId; Tcl_HashEntry *hPtr, *jPtr; --- 358,362 ---- Queue *queuePtr = NULL; Job *jobPtr = NULL, **nextPtrPtr; ! int code, new, create = 0, max, opt; char *jobId = NULL, buf[100], *queueId; Tcl_HashEntry *hPtr, *jPtr; *************** *** 373,377 **** JCancelIdx, JCreateIdx, JDeleteIdx, JGenIDIdx, JJobsIdx, JJobsListIdx, JThreadListIdx, JQueueIdx, JQueuesIdx, JQueueListIdx, JWaitIdx, JWaitAnyIdx ! } opt; if (objc < 2) { --- 373,377 ---- JCancelIdx, JCreateIdx, JDeleteIdx, JGenIDIdx, JJobsIdx, JJobsListIdx, JThreadListIdx, JQueueIdx, JQueuesIdx, JQueueListIdx, JWaitIdx, JWaitAnyIdx ! }; if (objc < 2) { *************** *** 380,384 **** } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", TCL_EXACT, ! (int *) &opt) != TCL_OK) { return TCL_ERROR; } --- 380,384 ---- } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", TCL_EXACT, ! &opt) != TCL_OK) { return TCL_ERROR; } Index: tclthread.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclthread.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tclthread.c 10 Jun 2005 17:58:41 -0000 1.2 --- tclthread.c 12 Jun 2005 14:42:44 -0000 1.3 *************** *** 120,123 **** --- 120,125 ---- NsTclMutexObjCmd(ClientData data, Tcl_Interp *interp, int objc, Tcl_Obj **objv) { + int opt; + void *lockArg; Ns_Mutex *lockPtr; static CONST char *opts[] = { *************** *** 126,135 **** enum { MCreateIdx, MDestroyIdx, MLockIdx, MUnlockIdx ! } opt; if (!GetArgs(interp, objc, objv, opts, 'm', MCreateIdx, ! (int *) &opt, (void **) &lockPtr)) { return TCL_ERROR; } switch (opt) { case MCreateIdx: --- 128,138 ---- enum { MCreateIdx, MDestroyIdx, MLockIdx, MUnlockIdx ! }; if (!GetArgs(interp, objc, objv, opts, 'm', MCreateIdx, ! &opt, &lockArg)) { return TCL_ERROR; } + lockPtr = (Ns_Mutex*)lockArg; switch (opt) { case MCreateIdx: *************** *** 174,177 **** --- 177,182 ---- Tcl_Obj **objv) { + int opt; + void *csArg; Ns_Cs *csPtr; static CONST char *opts[] = { *************** *** 180,189 **** enum { CCreateIdx, CDestroyIdx, CEnterIdx, CLeaveIdx ! } opt; ! if (!GetArgs(interp, objc, objv, opts, 'c', CCreateIdx, ! (int *) &opt, (void **) &csPtr)) { return TCL_ERROR; } switch (opt) { case CCreateIdx: --- 185,194 ---- enum { CCreateIdx, CDestroyIdx, CEnterIdx, CLeaveIdx ! }; if (!GetArgs(interp, objc, objv, opts, 'c', CCreateIdx, ! &opt, &csArg)) { return TCL_ERROR; } + csPtr = (Ns_Cs*)csArg; switch (opt) { case CCreateIdx: *************** *** 226,230 **** { Ns_Sema *semaPtr; ! int cnt; static CONST char *opts[] = { "create", "destroy", "release", "wait", NULL --- 231,236 ---- { Ns_Sema *semaPtr; ! int opt, cnt; ! void *semaArg; static CONST char *opts[] = { "create", "destroy", "release", "wait", NULL *************** *** 232,241 **** enum { SCreateIdx, SDestroyIdx, SReleaseIdx, SWaitIdx ! } opt; if (!GetArgs(interp, objc, objv, opts, 's', SCreateIdx, ! (int *) &opt, (void **) &semaPtr)) { return TCL_ERROR; } switch (opt) { case SCreateIdx: --- 238,248 ---- enum { SCreateIdx, SDestroyIdx, SReleaseIdx, SWaitIdx ! }; if (!GetArgs(interp, objc, objv, opts, 's', SCreateIdx, ! &opt, &semaArg)) { return TCL_ERROR; } + semaPtr = (Ns_Sema*)semaArg; switch (opt) { case SCreateIdx: *************** *** 290,295 **** Ns_Cond *condPtr; Ns_Mutex *lock; ! Ns_Time timeout; ! int result; static CONST char *opts[] = { "abswait", "broadcast", "create", "destroy", "set", --- 297,304 ---- Ns_Cond *condPtr; Ns_Mutex *lock; ! void *lockArg; ! void *condArg; ! Ns_Time timeout; ! int opt, result; static CONST char *opts[] = { "abswait", "broadcast", "create", "destroy", "set", *************** *** 299,308 **** EAbsWaitIdx, EBroadcastIdx, ECreateIdx, EDestroyIdx, ESetIdx, ESignalIdx, ETimedWaitIdx, EWaitIdx ! } opt; if (!GetArgs(interp, objc, objv, opts, 'e', ECreateIdx, ! (int *) &opt, (void **) &condPtr)) { return TCL_ERROR; } switch (opt) { case ECreateIdx: --- 308,318 ---- EAbsWaitIdx, EBroadcastIdx, ECreateIdx, EDestroyIdx, ESetIdx, ESignalIdx, ETimedWaitIdx, EWaitIdx ! }; if (!GetArgs(interp, objc, objv, opts, 'e', ECreateIdx, ! &opt, &condArg)) { return TCL_ERROR; } + condPtr = (Ns_Cond*)condArg; switch (opt) { case ECreateIdx: *************** *** 316,322 **** return TCL_ERROR; } ! if (GetAddr(interp, 'm', Tcl_GetString(objv[3]), (void **) &lock) != TCL_OK) { return TCL_ERROR; } if (objc < 5) { timeout.sec = timeout.usec = 0; --- 326,333 ---- return TCL_ERROR; } ! if (GetAddr(interp, 'm', Tcl_GetString(objv[3]), &lockArg) != TCL_OK) { return TCL_ERROR; } + lock = (Ns_Mutex*)lockArg; if (objc < 5) { timeout.sec = timeout.usec = 0; *************** *** 388,391 **** --- 399,404 ---- Tcl_Obj **objv) { + int opt; + void *rwlockArg; Ns_RWLock *rwlockPtr; static CONST char *opts[] = { *************** *** 396,405 **** RCreateIdx, RDestroyIdx, RReadLockIdx, RReadUnlockIdx, RWriteLockIdx, RWriteUnlockIdx, RUnlockIdx ! } opt; if (!GetArgs(interp, objc, objv, opts, 'r', RCreateIdx, ! (int *) &opt, (void **) &rwlockPtr)) { return TCL_ERROR; } switch (opt) { case RCreateIdx: --- 409,419 ---- RCreateIdx, RDestroyIdx, RReadLockIdx, RReadUnlockIdx, RWriteLockIdx, RWriteUnlockIdx, RUnlockIdx ! }; if (!GetArgs(interp, objc, objv, opts, 'r', RCreateIdx, ! &opt, &rwlockArg)) { return TCL_ERROR; } + rwlockPtr = (Ns_RWLock*)rwlockArg; switch (opt) { case RCreateIdx: *************** *** 469,472 **** --- 483,487 ---- } } else if (STREQ(argv[1], "wait") || STREQ(argv[1], "join")) { + void *tidArg; if (argc < 3) { Tcl_AppendResult(interp, "wrong # args: should be \"", *************** *** 474,481 **** return TCL_ERROR; } ! if (GetAddr(interp, 't', argv[2], (void **) &tid) != TCL_OK) { return TCL_ERROR; } Ns_ThreadJoin(&tid, &status); Tcl_SetResult(interp, (char *) status, (Tcl_FreeProc *) ns_free); --- 489,497 ---- return TCL_ERROR; } ! if (GetAddr(interp, 't', argv[2], &tidArg) != TCL_OK) { return TCL_ERROR; } + tid = (Ns_Thread)tidArg; Ns_ThreadJoin(&tid, &status); Tcl_SetResult(interp, (char *) status, (Tcl_FreeProc *) ns_free); Index: tclhttp.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclhttp.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tclhttp.c 10 Jun 2005 17:58:40 -0000 1.2 --- tclhttp.c 12 Jun 2005 14:42:44 -0000 1.3 *************** *** 102,106 **** Http *httpPtr; char buf[50], *result, *carg; ! int new, status, n, timeidx; Ns_Time timeout, incr; Ns_Set *hdrs; --- 102,106 ---- Http *httpPtr; char buf[50], *result, *carg; ! int new, status, n, timeidx, opt; Ns_Time timeout, incr; Ns_Set *hdrs; *************** *** 112,116 **** enum { HCancelIdx, HCleanupIdx, HQueueIdx, HWaitIdx ! } opt; char *method, *url, *body; --- 112,116 ---- enum { HCancelIdx, HCleanupIdx, HQueueIdx, HWaitIdx ! }; char *method, *url, *body; *************** *** 121,125 **** } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! (int *) &opt) != TCL_OK) { return TCL_ERROR; } --- 121,125 ---- } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! &opt) != TCL_OK) { return TCL_ERROR; } Index: log.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/log.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** log.c 10 Jun 2005 17:58:39 -0000 1.2 --- log.c 12 Jun 2005 14:42:44 -0000 1.3 *************** *** 337,341 **** Tcl_Obj *CONST objv[]) { ! int len; Cache *cachePtr; static CONST char *opts[] = { --- 337,341 ---- Tcl_Obj *CONST objv[]) { ! int len, opt; Cache *cachePtr; static CONST char *opts[] = { *************** *** 357,361 **** CReleaseIdx, CTruncIdx ! } opt; if (objc < 2) { --- 357,361 ---- CReleaseIdx, CTruncIdx ! }; if (objc < 2) { *************** *** 364,368 **** } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! (int *) &opt) != TCL_OK) { return TCL_ERROR; } --- 364,368 ---- } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! &opt) != TCL_OK) { return TCL_ERROR; } Index: tclinit.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclinit.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tclinit.c 10 Jun 2005 20:53:13 -0000 1.6 --- tclinit.c 12 Jun 2005 14:42:44 -0000 1.7 *************** *** 918,925 **** ISaveIdx, IUpdateIdx, IOnCreateIdx, IOnCleanupIdx, IOnInitIdx, IOnDeleteIdx ! } opt; char *script; int length, result; ! int status; if (objc < 2) { --- 918,925 ---- ISaveIdx, IUpdateIdx, IOnCreateIdx, IOnCleanupIdx, IOnInitIdx, IOnDeleteIdx ! }; char *script; int length, result; ! int status,opt; if (objc < 2) { *************** *** 928,932 **** } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! (int *) &opt) != TCL_OK) { return TCL_ERROR; } --- 928,932 ---- } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! &opt) != TCL_OK) { return TCL_ERROR; } Index: queue.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/queue.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** queue.c 10 Jun 2005 17:58:39 -0000 1.2 --- queue.c 12 Jun 2005 14:42:44 -0000 1.3 *************** *** 280,283 **** --- 280,284 ---- Tcl_Obj **objv) { + int opt; NsInterp *itPtr = arg; NsServer *servPtr = itPtr->servPtr; *************** *** 292,296 **** SActiveIdx, SAllIdx, SConnectionsIdx, SKeepaliveIdx, SPoolsIdx, SQueuedIdx, SThreadsIdx, SWaitingIdx, ! } opt; if (objc != 2 && objc != 3) { --- 293,297 ---- SActiveIdx, SAllIdx, SConnectionsIdx, SKeepaliveIdx, SPoolsIdx, SQueuedIdx, SThreadsIdx, SWaitingIdx, ! }; if (objc != 2 && objc != 3) { *************** *** 299,303 **** } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! (int *) &opt) != TCL_OK) { return TCL_ERROR; } --- 300,304 ---- } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! &opt) != TCL_OK) { return TCL_ERROR; } *************** *** 925,931 **** JoinConnThread(Ns_Thread *threadPtr) { Arg *argPtr; ! Ns_ThreadJoin(threadPtr, (void **) &argPtr); ns_free(argPtr); } --- 926,934 ---- JoinConnThread(Ns_Thread *threadPtr) { + void *argArg; Arg *argPtr; ! Ns_ThreadJoin(threadPtr, &argArg); ! argPtr = (Arg*)argArg; ns_free(argPtr); } Index: tclvar.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclvar.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tclvar.c 10 Jun 2005 17:58:41 -0000 1.2 --- tclvar.c 12 Jun 2005 14:42:44 -0000 1.3 *************** *** 383,387 **** Tcl_HashSearch search; char *pattern, *key; ! int i, lobjc, size; Tcl_Obj *result, **lobjv; --- 383,387 ---- Tcl_HashSearch search; char *pattern, *key; ! int i, opt, lobjc, size; Tcl_Obj *result, **lobjv; *************** *** 391,395 **** enum ISubCmdIdx { CSetIdx, CResetIdx, CGetIdx, CNamesIdx, CSizeIdx, CExistsIdx ! } opt; if (objc < 2) { --- 391,395 ---- enum ISubCmdIdx { CSetIdx, CResetIdx, CGetIdx, CNamesIdx, CSizeIdx, CExistsIdx ! }; if (objc < 2) { *************** *** 398,402 **** } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! (int *) &opt) != TCL_OK) { return TCL_ERROR; } --- 398,402 ---- } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! &opt) != TCL_OK) { return TCL_ERROR; } *************** *** 771,775 **** Tcl_HashEntry *hPtr; Tcl_HashSearch search; ! int new, code; char *var = NULL, *val = NULL; static CONST char *opts[] = { --- 771,775 ---- Tcl_HashEntry *hPtr; Tcl_HashSearch search; ! int new, code, opt; char *var = NULL, *val = NULL; static CONST char *opts[] = { *************** *** 778,782 **** enum { VExistsIdx, VGetIdx, VListIdx, VSetIdx, VUnsetIdx ! } opt; if (objc < 2) { --- 778,782 ---- enum { VExistsIdx, VGetIdx, VListIdx, VSetIdx, VUnsetIdx ! }; if (objc < 2) { *************** *** 785,789 **** } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! (int *) &opt) != TCL_OK) { return TCL_ERROR; } --- 785,789 ---- } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! &opt) != TCL_OK) { return TCL_ERROR; } Index: tclfile.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclfile.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tclfile.c 10 Jun 2005 17:58:40 -0000 1.3 --- tclfile.c 12 Jun 2005 14:42:44 -0000 1.4 *************** *** 1029,1033 **** char *name, *chanName; NsRegChan *regChan = NULL; ! int new, shared; Tcl_HashTable *tabPtr; Tcl_HashEntry *hPtr; --- 1029,1033 ---- char *name, *chanName; NsRegChan *regChan = NULL; ! int new, shared, opt; Tcl_HashTable *tabPtr; Tcl_HashEntry *hPtr; *************** *** 1038,1042 **** enum { CCleanupIdx, CListIdx, CCreateIdx, CPutIdx, CGetIdx ! } opt; if (objc < 2) { --- 1038,1042 ---- enum { CCleanupIdx, CListIdx, CCreateIdx, CPutIdx, CGetIdx ! }; if (objc < 2) { *************** *** 1045,1049 **** } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! (int *) &opt) != TCL_OK) { return TCL_ERROR; } --- 1045,1049 ---- } if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, ! &opt) != TCL_OK) { return TCL_ERROR; } |