FR3 on FreeBSD
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Wed Jul 17 09:35:23 CEST 2013
> freeradius-server-master/src/modules/rlm_counter/rlm_counter.c: In function 'find_next_reset':
> freeradius-server-master/src/modules/rlm_counter/rlm_counter.c:338: warning: format '%li' expects type 'long int', but argument 3 has type 'time_t'
> freeradius-server-master/src/modules/rlm_counter/rlm_counter.c:338: warning: format '%li' expects type 'long int', but argument 5 has type 'time_t'
>
> freeradius-server-master/src/modules/rlm_krb5/rlm_krb5.c: In function 'krb5_auth':
> freeradius-server-master/src/modules/rlm_krb5/rlm_krb5.c:299: warning: 'rcode' may be used uninitialized in this function
Issue if it couldn't find the keytab.
>
> freeradius-server-master/src/modules/rlm_python/rlm_python.c: In function 'do_python':
> freeradius-server-master/src/modules/rlm_python/rlm_python.c:396: warning: 'prev_thread_state' may be used uninitialized in this function
> freeradius-server-master/src/modules/rlm_python/rlm_python.c:395: warning: 'gstate' may be used uninitialized in this function
False positives.
>
> freeradius-server-master/src/modules/rlm_sqlcounter/rlm_sqlcounter.c: In function 'find_next_reset':
> freeradius-server-master/src/modules/rlm_sqlcounter/rlm_sqlcounter.c:176: warning: format '%li' expects type 'long int', but argument 3 has type 'time_t'
> freeradius-server-master/src/modules/rlm_sqlcounter/rlm_sqlcounter.c:176: warning: format '%li' expects type 'long int', but argument 5 has type 'time_t'
> freeradius-server-master/src/modules/rlm_sqlcounter/rlm_sqlcounter.c: In function 'find_prev_reset':
> freeradius-server-master/src/modules/rlm_sqlcounter/rlm_sqlcounter.c:245: warning: format '%li' expects type 'long int', but argument 3 has type 'time_t'
> freeradius-server-master/src/modules/rlm_sqlcounter/rlm_sqlcounter.c:245: warning: format '%li' expects type 'long int', but argument 5 has type 'time_t'
> freeradius-server-master/src/modules/rlm_sqlcounter/rlm_sqlcounter.c: In function 'sqlcounter_expand':
> freeradius-server-master/src/modules/rlm_sqlcounter/rlm_sqlcounter.c:302: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'time_t'
> freeradius-server-master/src/modules/rlm_sqlcounter/rlm_sqlcounter.c:302: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'time_t'
> freeradius-server-master/src/modules/rlm_sqlcounter/rlm_sqlcounter.c:307: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'time_t'
> freeradius-server-master/src/modules/rlm_sqlcounter/rlm_sqlcounter.c:307: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'time_t'
>
> freeradius-server-master/src/main/command.c: In function 'command_print_stats':
> freeradius-server-master/src/main/command.c:1695: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'time_t'
>
> freeradius-server-master/src/main/log.c: In function 'log_talloc_report':
> freeradius-server-master/src/main/log.c:484: warning: 'null_ctx' may be used uninitialized in this function
That might cause an issue on -m/M.
> freeradius-server-master/src/main/radwho.c: In function 'main':
> freeradius-server-master/src/main/radwho.c:451: warning: format '%ld' expects type 'long int', but argument 2 has type 'time_t'
The time_t ones are annoying, the width of time_t is implementation specific. FreeBSD (being sensible) has probably switched to 64bit unix timestamps. I'll do some research, google suggests that there's no portable macro as there is for 64bit integers (PRi[u]64), and the C preprocessor can't evaluate the underlying types of typedefs.
Thanks for posting the above.
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team
More information about the Freeradius-Devel
mailing list