Compiler warnings HP-UX

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiler warnings HP-UX

armin-vim-spam

Hi there,

I recently built vim 7.1 with patches 1-293 on HP-UX 11.23 (Itanium) with HP Ansi C-Compiler.
vim compiles and runs fine but I get some warnings. I'm no programmer so I can't seperate
unimportant from important warnings. Maybe this is of interest:
I'm building with --prefix=/opt/vim --with-x --disable-gtktest --enable-motif-check --with-tlib=curses
and get

        cc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF
-I/usr/local/include  -g         -o objects/mbyte.o mbyte.c
"mbyte.c", line 4934: warning #2167-D: argument of type "void (*)()" is
          incompatible with parameter of type "XIMProc"
                                         xim_instantiate_cb, NULL);
                                         ^

"mbyte.c", line 4958: warning #2167-D: argument of type "void (*)()" is
          incompatible with parameter of type "XIMProc"
                                   xim_instantiate_cb, NULL);
                                   ^

"mbyte.c", line 4983: warning #2167-D: argument of type "void (*)()" is
          incompatible with parameter of type "XIMProc"
                                   xim_instantiate_cb, NULL);
                                   ^

        cc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF
-I/usr/local/include  -g         -o objects/option.o option.c
"option.c", line 3428: warning #4275-D: constant out of range ([0 - 0])
for
          the operator
            if (options[opt_idx].indir == PV_SCROLL)
                                       ^

"option.c", line 3446: warning #4275-D: constant out of range ([0 - 0])
for
          the operator
            if (options[opt_idx].indir == PV_ML && getuid() == ROOT_UID)
                                       ^

"option.c", line 8632: warning #4275-D: constant out of range ([0 - 0])
for
          the operator
                            p->indir == PV_SYN
                                     ^
Regards,
Armin


Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und optional 60 Pay TV Sender, einen elektronischen Programmführer mit Movie Star Bewertungen von TV Movie. Außerdem, aktuelle Filmhits und spannende Dokus in der Arcor-Videothek. Infos unter www.arcor.de/tv

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Compiler warnings HP-UX

Kim Shawn

Hi,

HP compilers are extermely sensitive (or strict). They are always  
complaining about almost everything.
The warning messages just seem OK.

You can just dismiss them.
Make use of your vim. No need to worry, as far as I'm concerned.

Happy Vimming~
Shawn.

2008. 04. 29, 오전 5:30, [hidden email] 작성:

>
> Hi there,
>
> I recently built vim 7.1 with patches 1-293 on HP-UX 11.23 (Itanium)  
> with HP Ansi C-Compiler.
> vim compiles and runs fine but I get some warnings. I'm no  
> programmer so I can't seperate
> unimportant from important warnings. Maybe this is of interest:
> I'm building with --prefix=/opt/vim --with-x --disable-gtktest --
> enable-motif-check --with-tlib=curses
> and get
>
>        cc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF
> -I/usr/local/include  -g         -o objects/mbyte.o mbyte.c
> "mbyte.c", line 4934: warning #2167-D: argument of type "void (*)()"  
> is
>          incompatible with parameter of type "XIMProc"
>                                         xim_instantiate_cb, NULL);
>                                         ^
>
> "mbyte.c", line 4958: warning #2167-D: argument of type "void (*)()"  
> is
>          incompatible with parameter of type "XIMProc"
>                                   xim_instantiate_cb, NULL);
>                                   ^
>
> "mbyte.c", line 4983: warning #2167-D: argument of type "void (*)()"  
> is
>          incompatible with parameter of type "XIMProc"
>                                   xim_instantiate_cb, NULL);
>                                   ^
>
>        cc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF
> -I/usr/local/include  -g         -o objects/option.o option.c
> "option.c", line 3428: warning #4275-D: constant out of range ([0 -  
> 0])
> for
>          the operator
>            if (options[opt_idx].indir == PV_SCROLL)
>                                       ^
>
> "option.c", line 3446: warning #4275-D: constant out of range ([0 -  
> 0])
> for
>          the operator
>            if (options[opt_idx].indir == PV_ML && getuid() ==  
> ROOT_UID)
>                                       ^
>
> "option.c", line 8632: warning #4275-D: constant out of range ([0 -  
> 0])
> for
>          the operator
>                            p->indir == PV_SYN
>                                     ^
> Regards,
> Armin
>
>
> Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends,  
> mehr Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV  
> Programme und optional 60 Pay TV Sender, einen elektronischen  
> Programmführer mit Movie Star Bewertungen von TV Movie. Außerdem,  
> aktuelle Filmhits und spannende Dokus in der Arcor-Videothek. Infos  
> unter www.arcor.de/tv
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Compiler warnings HP-UX

Bram Moolenaar
In reply to this post by armin-vim-spam


Armin wrote:

> I recently built vim 7.1 with patches 1-293 on HP-UX 11.23 (Itanium)
> with HP Ansi C-Compiler.  vim compiles and runs fine but I get some
> warnings. I'm no programmer so I can't seperate unimportant from
> important warnings. Maybe this is of interest:
> I'm building with --prefix=/opt/vim --with-x --disable-gtktest --enable-motif-check --with-tlib=curses
> and get
>
>         cc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF
> -I/usr/local/include  -g         -o objects/mbyte.o mbyte.c
> "mbyte.c", line 4934: warning #2167-D: argument of type "void (*)()" is
>           incompatible with parameter of type "XIMProc"
>                                          xim_instantiate_cb, NULL);
>                                          ^
>
> "mbyte.c", line 4958: warning #2167-D: argument of type "void (*)()" is
>           incompatible with parameter of type "XIMProc"
>                                    xim_instantiate_cb, NULL);
>                                    ^
>
> "mbyte.c", line 4983: warning #2167-D: argument of type "void (*)()" is
>           incompatible with parameter of type "XIMProc"
>                                    xim_instantiate_cb, NULL);
>                                    ^

I would simply ignore these.  According to my manpage the type should be
XIDProc.  Probably can't make it work without warnings for everybody.

>         cc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF
> -I/usr/local/include  -g         -o objects/option.o option.c
> "option.c", line 3428: warning #4275-D: constant out of range ([0 - 0])
> for
>           the operator
>             if (options[opt_idx].indir == PV_SCROLL)
>                                        ^
>
> "option.c", line 3446: warning #4275-D: constant out of range ([0 - 0])
> for
>           the operator
>             if (options[opt_idx].indir == PV_ML && getuid() == ROOT_UID)
>                                        ^
>
> "option.c", line 8632: warning #4275-D: constant out of range ([0 - 0])
> for
>           the operator
>                             p->indir == PV_SYN
>                                      ^

Hmm, perhaps it helps if you change the idopt_T definition to:

typedef enum
{
    PV_NONE = 0,
    PV_MAXVAL = 0xffff
} idopt_T;


--
Q: Is selling software the same as selling hardware?
A: No, good hardware is sold new, good software has already been used by many.

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Aw: Re: Compiler warnings HP-UX

armin-vim-spam

> Armin wrote:
>
> I would simply ignore these.  According to my manpage the type should be
> XIDProc.  Probably can't make it work without warnings for everybody.
>
OK, ignored.

> >         cc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF
> > -I/usr/local/include  -g         -o objects/option.o option.c
> > "option.c", line 3428: warning #4275-D: constant out of range ([0 - 0])
> > for
> >           the operator
> >             if (options[opt_idx].indir == PV_SCROLL)
> >                                        ^
> >
> > "option.c", line 3446: warning #4275-D: constant out of range ([0 - 0])
> > for
> >           the operator
> >             if (options[opt_idx].indir == PV_ML && getuid() == ROOT_UID)
> >                                        ^
> >
> > "option.c", line 8632: warning #4275-D: constant out of range ([0 - 0])
> > for
> >           the operator
> >                             p->indir == PV_SYN
> >                                      ^
>
> Hmm, perhaps it helps if you change the idopt_T definition to:
>
> typedef enum
> {
>     PV_NONE = 0,
>     PV_MAXVAL = 0xffff
> } idopt_T;
The warning is gone after adding the PV_MAXVAL line.
This is probably not enough bug for a patch, isn't it? :-)
Thanks for clarifying this!

Regards,
Armin


Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und optional 60 Pay TV Sender, einen elektronischen Programmführer mit Movie Star Bewertungen von TV Movie. Außerdem, aktuelle Filmhits und spannende Dokus in der Arcor-Videothek. Infos unter www.arcor.de/tv

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---