Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: slk.c still broken on some architecetures



Perhaps this should use ``%zd'' in the format string, rather than
using ``%ld'' ???


On Thu, 24 Jun 2021, Paul Goyette wrote:

Module Name:    src
Committed By:   blymn
Date:           Thu Jun 24 05:53:05 UTC 2021

Modified Files:
        src/lib/libcurses: slk.c

Log Message:
Make sure we don't use wide char routines when DISABLE_WCHAR is in
effect.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libcurses/slk.c


Even with rev 1.10 of slk.c I am still seeing the following breakage
for dreamcast, evbsh3-eb, evbsh3-el, hpcsh, landisk, and mmeye.  I have
not tried all other architectures, but I did _not_ see this error on
cats.

dependall ===> lib/libcurses/PSD.doc
/build/netbsd-current/src_ro/lib/libcurses/slk.c: In function '__slk_wset':
/build/netbsd-current/src_ro/lib/libcurses/slk.c:571:52: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
 571 |  __CTRACE(__CTRACE_INPUT, "__slk_wset: wcsrtombs %ld\n", len);
     |                                                  ~~^     ~~~
     |                                                    |     |
| | size_t {aka unsigned int}
     |                                                    long int
     |                                                  %d
cc1: all warnings being treated as errors
*** Failed target: slk.go
*** Failed commands:
       ${_MKTARGET_COMPILE}
${COMPILE.c} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
*** [slk.go] Error code 1
nbmake[7]: stopped in /build/netbsd-current/src_ro/lib/libcurses
1 error


+--------------------+--------------------------+----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:    |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost    |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost  |
|                    |                          | pgoyette99%gmail.com@localhost |
+--------------------+--------------------------+----------------------+

!DSPAM:60d4a603239705180217527!



+--------------------+--------------------------+----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:    |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost    |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost  |
|                    |                          | pgoyette99%gmail.com@localhost |
+--------------------+--------------------------+----------------------+


Home | Main Index | Thread Index | Old Index