roadlabs / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 0 forks source link

Compile error due to %li format string for long long int argument #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Fails to compile on 32 bit Ubuntu 12.04 due to a print statement with a long 
long int argument attempting to use %li to consume it.

Compiles once the printf is changed to %lli .

--- a/cefpython/cef3/subprocess/cefpython_app.cpp
+++ b/cefpython/cef3/subprocess/cefpython_app.cpp
@@ -395,7 +395,7 @@ void CefPythonApp::DoJavascriptBindingsForBrowser(
             // be executed anymore.
             DebugLog("Renderer: DoJavascriptBindingsForBrowser() WARNING: " \
                 "frameId <= 0");
-            printf("cefpython: Renderer: frameId = %li\n", *it);
+            printf("cefpython: Renderer: frameId = %lli\n", *it);
             continue;
         }
         CefRefPtr<CefFrame> frame = browser->GetFrame(*it);

Original issue reported on code.google.com by gregfarr...@gmail.com on 7 Nov 2013 at 4:29

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed, see the commit:
https://code.google.com/p/cefpython/source/detail?r=0767285eb64c9faeab7393d0ac84
11feb90728fa

Original comment by czarek.t...@gmail.com on 13 Nov 2013 at 12:00

GoogleCodeExporter commented 9 years ago
On Ubuntu 64-bit %lli is causing an error:

    cefpython_app.cpp: In member function ‘virtual void 
    CefPythonApp::DoJavascriptBindingsForBrowser(CefRefPtr<CefBrowser>)’:

    cefpython_app.cpp:398:64: error: format ‘%lli’ expects argument of type ‘long long int’, 
    but argument 2 has type ‘long int’ [-Werror=format]

So it looks like %lli is expected on 32-bit and %li on 64-bit.

Original comment by czarek.t...@gmail.com on 27 Dec 2013 at 12:53

GoogleCodeExporter commented 9 years ago
I have commented out the printf statement, see revision 5f58cd6d6eb2.

Original comment by czarek.t...@gmail.com on 27 Dec 2013 at 12:56