Re: test-utils.c:233: error: integer constant is too large for ‘long’ type

Shawn J. Goff shawn7400 at gmail.com
Fri Aug 31 13:14:02 PDT 2012


On Fri 31 Aug 2012 01:26:16 PM EDT, Shawn J. Goff wrote:
> I'm trying to add a libqmi package to Buildroot and I'm getting an
> error I can't explain. The integer operations tests are failing
> because guint64 is defined as 'long' instead of 'long long'. I did a
> grep 'typdef.*guint64' in the glib include directory (in fact, I
> searched buildroot's entire output/staging directory, which contains
> all libraries and header files) and saw "G_GNUC_EXTENSION typedef
> unsigned long long guint64;", so it's definitely defined as 'long
> long' there. I did a search in the libqmi project also, and it's not
> redefining it anywhere, so I have no idea how it's defined as 'long'
> here.
>
> Any idea what else I can do to track this down?

I got this; the problem isn't with the LHS; it's that the compiler is 
trying to fit that literal into a long placeholder. Adding "LL" to the 
end of it fixes that. A patch is forthcoming.


More information about the libqmi-devel mailing list