[torquedev] Regarding Torque 2.5.8-snap.201108241142

Tobias Burnus burnus at net-b.de
Thu Aug 25 03:30:56 MDT 2011


Hello,


a) Configure --help: If I have it understood correctly, the default is 
--disable-gcc-warnings. Shouldn't then "--help" list 
--enable-gcc-warnings? Currently, it reads as:

Optional Features:
[...]
--disable-gcc-warnings Disable gcc strictness and warnings. If using
gcc, default is to error on any warning


b) With --enable-gcc-warnings, I get the following warnings.

Please consider fixing them - not neccessarily for the 2.5.8 release but 
it would be great if I could build 2.5.9 with that option.

All warnings I get are of the type: "unused-but-set-variable".


../Libifl/dec_attrl.c: In function 'decode_DIS_attrl':
../Libifl/dec_attrl.c:116:17: error: variable 'name_len' set but not 
used [-Werror=unused-but-set-variable]

../Libifl/dec_attropl.c: In function 'decode_DIS_attropl':
../Libifl/dec_attropl.c:116:17: error: variable 'name_len' set but not 
used [-Werror=unused-but-set-variable]

Both are:
name_len = disrui(sock, &rc); /* name_len is unused here */

How about changing it to something like:
(void) disrui(sock, &rc); /* Returned name_len is unused here */


../Libnet/net_client.c: In function 'await_connect':
../Libnet/net_client.c:181:7: error: variable 'MaxNumDescriptors' set 
but not used [-Werror=unused-but-set-variable]

Here, the function call can be elminiated completely.


../Libnet/rm.c: In function 'activereq':
../Libnet/rm.c:1056:7: error: variable 'MaxNumDescriptors' set but not 
used [-Werror=unused-but-set-variable]

In this case, it can be moved into the #else branch of #if RPP.

And in src/lib/Libutils:
u_threadpool.c: In function ‘work_thread’:
u_threadpool.c:203:17: error: variable ‘expired’ set but not used 
[-Werror=unused-but-set-variable]

Simply set to TRUE/FALSE but not used.


In src/server:
job_func.c: In function ‘job_clone_wt’:
job_func.c:950:21: error: variable ‘new_task’ set but not used 
[-Werror=unused-but-set-variable]

Casting return value to (void)?


pbsd_init.c: In function ‘pbsd_init’:
pbsd_init.c:466:21: error: variable ‘wt’ set but not used 
[-Werror=unused-but-set-variable]

Ditto.

req_getcred.c: In function ‘unmunge_request’:
req_getcred.c:221:11: error: variable ‘newfd’ set but not used 
[-Werror=unused-but-set-variable]

Seemingly not used at all.


req_jobobit.c: In function ‘req_jobobit’:
req_jobobit.c:2240:10: error: variable ‘have_resc_used’ set but not used 
[-Werror=unused-but-set-variable]

Move into #ifdef USESAVEDRESOURCES


req_modify.c: In function ‘chkpt_xfr_hold’:
req_modify.c:298:21: error: variable ‘ptasknew’ set but not used 
[-Werror=unused-but-set-variable]

Cast return value of set_test to (void)?

req_modify.c: In function ‘chkpt_xfr_done’:
req_modify.c:338:14: error: variable ‘pjob’ set but not used 
[-Werror=unused-but-set-variable]

Dead code?


req_modify.c: In function ‘chkpt_xfr_done’:
req_modify.c:337:25: error: variable ‘preq’ set but not used 
[-Werror=unused-but-set-variable]

Ditto.

req_register.c: In function ‘encode_depend’:
req_register.c:2425:9: error: variable ‘BSpace’ set but not used 
[-Werror=unused-but-set-variable]

Again: Dead code.


req_stat.c: In function ‘req_stat_job_step2’:
req_stat.c:353:25: error: variable ‘IsTruncated’ set but not used 
[-Werror=unused-but-set-variable]

Dead code.


stat_job.c: In function ‘status_attrib’:
stat_job.c:306:25: error: variable ‘upperBound’ set but not used 
[-Werror=unused-but-set-variable]

Dead code.


svr_jobfunc.c: In function ‘chk_svr_resc_limit’:
svr_jobfunc.c:962:24: error: variable ‘gpuresc’ set but not used 
[-Werror=unused-but-set-variable]

Dead code (You might want to comment it instead of deleating).



mom_mach.c: In function ‘overcpu_proc’:
mom_mach.c:885:10: error: variable ‘memsize’ set but not used 
[-Werror=unused-but-set-variable]
mom_mach.c: In function ‘overmem_proc’:
mom_mach.c:1031:22: error: variable ‘memsize’ set but not used 
[-Werror=unused-but-set-variable]

Dead code.


In src/resmom:
requests.c: In function ‘del_files’:
requests.c:2583:9: error: variable ‘del_dir’ set but not used 
[-Werror=unused-but-set-variable]

Dead code. (There is a "/* if(del_dir) */" ...)

requests.c: In function ‘req_returnfiles’:
requests.c:3004:7: error: variable ‘rc’ set but not used 
[-Werror=unused-but-set-variable]

Check the value "rc" value of return_file (error checking)?


requests.c: In function ‘req_cpyfile’:
requests.c:3692:13: error: variable ‘path_changed’ set but not used 
[-Werror=unused-but-set-variable]

(unclear to me - cast return value to void?)



Further issues:

checkpoint.c: In function ‘mom_checkpoint_job’:
checkpoint.c:1206:8: error: variable ‘filelen’ set but not used 
[-Werror=unused-but-set-variable]

start_exec.c: In function ‘TMomFinalizeJob1’:
start_exec.c:1449:22: error: variable ‘presc’ set but not used 
[-Werror=unused-but-set-variable]
start_exec.c: In function ‘TMomFinalizeJob2’:
start_exec.c:1886:24: error: variable ‘ptask’ set but not used 
[-Werror=unused-but-set-variable]

iff2.c: In function ‘main’:
iff2.c:153:7: error: variable ‘PBSLOGLEVEL’ set but not used 
[-Werror=unused-but-set-variable]

qsub.c: In function ‘process_opts’:
qsub.c:2978:15: error: variable ‘PBSPort’ set but not used 
[-Werror=unused-but-set-variable]

qstat.c: In function ‘main’:
qstat.c:2523:9: error: variable ‘ret’ set but not used 
[-Werror=unused-but-set-variable]


Tobias


More information about the torquedev mailing list