From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <65e263b9ec88ad6c676a67ccaece92ff@proxima.alt.za> References: <65e263b9ec88ad6c676a67ccaece92ff@proxima.alt.za> Date: Tue, 2 Apr 2013 10:02:31 +0300 Message-ID: From: Yaroslav To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=bcaec5014c1d3d816304d95b52a9 Subject: Re: [9fans] Unexpected complaint Topicbox-Message-UUID: 3c7b10de-ead8-11e9-9d60-3106f5b1d025 --bcaec5014c1d3d816304d95b52a9 Content-Type: text/plain; charset=UTF-8 works as expected if given "%llud" format. 2013/4/2 > The following code triggers a warning: > > #include > #include > > int main() { > unsigned long long val = 0; > > print("VAL: %llu\n", val); > return 0; > } > > warning: llu.c:7 format mismatch llu > UVLONG, arg 2 > > and produces the damnedest output: > > VAL: % > %(not terminated by a newline). > > Something's not right, anybody know what the cause is? And maybe the > cure? > > ++L > > > -- - Yaroslav --bcaec5014c1d3d816304d95b52a9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
works as expected if given "%llud" format.
=


2013/4/2 <lucio@proxima.alt.za>
The following code triggers a warning:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 #include <u.h>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 #include <libc.h>

=C2=A0 =C2=A0 =C2=A0 =C2=A0 int main() {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 unsigned long long = val =3D 0;

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 print("VAL: %l= lu\n", val);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return 0;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }

warning: llu.c:7 format mismatch llu
=C2=A0UVLONG, arg 2

and produces the damnedest output:

VAL: %
%(not terminated by a newline).

Something's not right, anybody know what the cause is? =C2=A0And maybe = the
cure?

++L





--
- Yaroslav
--bcaec5014c1d3d816304d95b52a9--