[Vala] warning: format not a string literal



Hello everyone.

I am working on a little test code to learn Vala.  I am getting the
following warning from compiler:

/home/.../ValaTest.vala.c: In function
‘vala_test_vala_test_delete_event_this’:

/home/.../ValaTest.vala.c:129: warning: format not a string literal and
no format arguments


Here is the method I feel is responsible for this:


private bool delete_event_this() {
        
    var msg = new MessageDialog(this, DialogFlags.MODAL,
        MessageType.INFO, ButtonsType.OK,
        "I've been clicked " + clicks.to_string() + " times!");
    msg.run();
                                
    stdout.printf("I was clicked " + clicks.to_string() + " times!\n");
    return false;
        
}

Since its warning, the program still compiles, and nothing seems amiss
when I run it.  But it must be warning for a reason.  I've googled this
and looked in the mailing list archives, but I've come up dry.

Thanks,
Travis Beaty.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]