[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Patch for debase/kioslave/ftp?
From: Stephan Kulow <coolo () caldera ! de>
Date: 1999-08-06 8:57:05
[Download RAW message or body]
Magnus Benngard wrote:
>
> On Fri, 06 Aug 1999, Stephan Kulow wrote:
> > Magnus Benngard wrote:
> > >
> > > Hi!
> > >
> > > Could some smarter than me se if this could be right?
> > >
> > > [dns]/usr/local/src/kde/kdebase/kioslave/ftp# diff ftp.h.old ftp.h
> > > 125c125
> > > < bool ftpLogin( const char *user, const char *pass, QString& redirect = \
> > > QString::null );
> > > ---
> > > > bool ftpLogin( const char *user, const char *pass, QString& redirect = \
> > > > (QString&) QString::null );
> > >
> > > I am using gcc-2.95!
> > Not without the error. As it is it's wrong. It has to be either a const
> > reference or should have 0 as default value.
> >
> Without patch:
>
> [dns]/usr/local/src/kde/kdebase/kioslave/ftp# make
> g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/kde/include \
> -I/usr/local/qt/include -I/usr/X11R6/include -O2 -c main.cc In file included \
> from main.h:11, from main.cc:14:
> ftp.h:125: invalid type `const QString' for default argument to `QString &'
> make: *** [main.o] Error 1
> [dns]/usr/local/src/kde/kdebase/kioslave/ftp
>
> With patch:
>
> [dns]/usr/local/src/kde/kdebase/kioslave/ftp# make
> g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/kde/include \
> -I/usr/local/qt/include -I/usr/X11R6/include -O2 -c main.cc g++ -DHAVE_CONFIG_H \
> -I. -I. -I../.. -I/usr/local/kde/include -I/usr/local/qt/include \
> -I/usr/X11R6/include -O2 -c ftp.cc
> /bin/sh ../../libtool --silent --mode=link g++ -O2 -L/usr/local/kde/lib \
> -L/usr/local/qt/lib -L/usr/X11R6/lib -rpath /usr/local/kde/lib -rpath \
> /usr/local/qt/lib -rpath /usr/X11R6/lib -o kio_ftp main.o ftp.o -lkio \
> [dns]/usr/local/src/kde/kdebase/kioslave/ftp
Sure, casts make compilers shut up, but that doesn't mean they were
right. the same with the (char*) cast in your former patch. It's simply
wrong. The right thing is to have perror to be const char*
Greetings, Stephan
--
Better give your hours some more life than
your life some more hours. - anonymous
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic