There are more than 5000 warnings issued during "make buildworld". Some of them are false positives, but some of them are sign of true errors. Nobody is upset by warnings due it's amount, so some errors remain uncorrected. I want to cleanup the code-base from warnings, so warnings will become "attention mark" again. usr.sbin/timed/timed/master.c:340: warning: no return statement in function returning non-void usr.sbin/timed/timed/readmsg.c:501: warning: long int format, int32_t arg (arg 6) usr.sbin/timed/timed/readmsg.c:501: warning: long int format, int32_t arg (arg 7) How-To-Repeat: N/A
On 2004-09-12 04:37, Dan Lukes <dan@obluda.cz> wrote: > usr.sbin/timed/timed/readmsg.c:501: warning: long int format, int32_t arg (arg 6) > usr.sbin/timed/timed/readmsg.c:501: warning: long int format, int32_t arg (arg 7) > - fprintf(fd, "%s %d %-6u (%ld,%ld) %-15s %s\n", > + fprintf(fd, "%s %d %-6u (%d,%d) %-15s %s\n", There's no guarantee that an int32_t value will be defined with an `int'. This might result in unexpected truncation of the printed value. A better fix, IMHO, would be to change the format to %jd and then cast the value to (intmax_t) which should avoid truncation of the value (you'll also have to include <stdint.h> for intmax_t to be visible). There are many other warnings in timed that are exposed if you try to build it with an increased WARNS level. Since you seem to like doing this sort of work, can you try the following (and see if you can come up with fixes for the warnings this shows)? # cd /usr/src/usr.sbin/timed/ # make NO_WERROR=1 WARNS?=3 Thank you for your work so far :-)
On Sun, 12 Sep 2004, Giorgos Keramidas wrote: >> - fprintf(fd, "%s %d %-6u (%ld,%ld) %-15s %s\n", >> + fprintf(fd, "%s %d %-6u (%d,%d) %-15s %s\n", > > There's no guarantee that an int32_t value will be defined with an `int'. > This might result in unexpected truncation of the printed value. A better True. In the fact, I miss the existence of 'j' modifier and intmax_t type. > of work, can you try the following (and see if you can come up with fixes > for the warnings this shows)? > > # cd /usr/src/usr.sbin/timed/ > # make NO_WERROR=1 WARNS?=3 I'm compiling with -Wall -O3. It seems to be more than any WARNS=X If there are some warning not corrected by attached patches, then it mean I'm don't know how the good way to correct it. > Thank you for your work so far :-) I have a lot of spare time now only ... ;-) Dan
The attached patches fix a lot of the warnings in usr.sbin/timed with high WARNS levels and GCC 4. -- Bruce Cran
Bruce Cran napsal/wrote, On 09/05/08 00:40: > + "clock correction %lld sec too large to adjust", > + (long long int)adj.tv_sec); It seems to be better for me to use '%jd' and (intmax_t)adj.tv_sec Dan
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>