>>> On 25.04.18 at 11:04, <o...@aepfle.de> wrote: > Am Wed, 25 Apr 2018 09:59:23 +0100 > schrieb Wei Liu <wei.l...@citrix.com>: > >> Do you have the full diff of your changes? > > Not right now. But without 'val', or val being uint, the same error happens > in f(): > > #include <stdio.h> > void f(void) > { > unsigned short req_prod = 0, req_cons = 65400; > unsigned short val; > val = req_prod - req_cons; > printf("req_prod - req_cons %u\n", val); > printf("req_prod - req_cons %x\n", val); > }
Well, of course - anything more narrow than int will be promoted to int first. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel