XGetInputFocus causes warngins - Xwindows

This is a discussion on XGetInputFocus causes warngins - Xwindows ; Compiling with cc -Wall, I get the following warning (the program executes fine ): JToolkit.c:258: warning: int format, Window arg (arg 2) JToolkit.c:258: warning: int format, Window arg (arg 3) Here's the function: Window focus_r; int revert_to_focus; XGetInputFocus(display, &focus_r, &revert_to_focus); ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: XGetInputFocus causes warngins

  1. XGetInputFocus causes warngins

    Compiling with cc -Wall, I get the following warning (the program executes
    fine ):

    JToolkit.c:258: warning: int format, Window arg (arg 2)
    JToolkit.c:258: warning: int format, Window arg (arg 3)

    Here's the function:
    Window focus_r;
    int revert_to_focus;
    XGetInputFocus(display, &focus_r, &revert_to_focus);

    According to the example I have, the variable types match the function
    declaration. Type casting got rid of the warning but (as I expected) caused
    a Segmentation Fault.

    I've never seen this type of warning before. Anybody know how to get rid of
    it?

    Thanks!
    --

    Tom Bitsky, Jr
    tbj@automateddesign.com

    Automated Design Corporation
    P: (630) 783-1150 F: (630) 783-1159



  2. Re: XGetInputFocus causes warngins

    Oddly, when I recompiled this morning ( the computer had been restarted ),
    this compiler warning disappeared. I didn't change the code.

    Anyway, it's a non-issue now.

    "Thomas Junior" wrote in message
    news:umQsb.27569$9M3.1309@newsread2.news.atl.earth link.net...
    > Compiling with cc -Wall, I get the following warning (the program executes
    > fine ):
    >
    > JToolkit.c:258: warning: int format, Window arg (arg 2)
    > JToolkit.c:258: warning: int format, Window arg (arg 3)
    >
    > Here's the function:
    > Window focus_r;
    > int revert_to_focus;
    > XGetInputFocus(display, &focus_r, &revert_to_focus);
    >
    > According to the example I have, the variable types match the function
    > declaration. Type casting got rid of the warning but (as I expected)

    caused
    > a Segmentation Fault.
    >
    > I've never seen this type of warning before. Anybody know how to get rid

    of
    > it?
    >
    > Thanks!
    > --
    >
    > Tom Bitsky, Jr
    > tbj@automateddesign.com
    >
    > Automated Design Corporation
    > P: (630) 783-1150 F: (630) 783-1159
    >
    >




+ Reply to Thread