On Sat, 2007-08-25 at 03:23 +0000, Amos Jeffries wrote:
> Update of cvs.devel.squid-cache.org:/cvsroot/squid/squid3/src/DiskIO/AIO
> 
> Modified Files:
>       Tag: docs
>       AIODiskFile.cc AIODiskFile.h 
> Log Message:
> BUG: silent implicit type conversion. found by doxygen.
> 
> 
> Index: AIODiskFile.cc
> ===================================================================
> RCS file: /cvsroot/squid/squid3/src/DiskIO/AIO/AIODiskFile.cc,v
> retrieving revision 1.4
> retrieving revision 1.4.2.1
> diff -C2 -d -r1.4 -r1.4.2.1
> *** AIODiskFile.cc    28 Apr 2007 22:51:56 -0000      1.4
> --- AIODiskFile.cc    25 Aug 2007 03:23:22 -0000      1.4.2.1
> ***************
> *** 81,86 ****
>   }
>   
>   void
> ! AIODiskFile::open (int flags, mode_t mode, IORequestor::Pointer callback)
>   {
>       /* Simulate async calls */
> --- 81,87 ----
>   }
>   
> + /// \bug Is this not meant to be "RefCount< DiskFile > callback" ??
>   void
> ! AIODiskFile::open(int flags, mode_t mode, IORequestor::Pointer callback)
>   {
>       /* Simulate async calls */

AFAICT, IORequestor::Pointer is RefCount<IORequestor>. If so, there is
no bug although you may want to change the type to one or the other
everywhere for consistency and to make doxygen happy.

RefCount<DiskFile> would be wrong because DiskFile::open() and create()
profiles do not use that for the callback parameter.

> Index: AIODiskFile.h
> ===================================================================
> RCS file: /cvsroot/squid/squid3/src/DiskIO/AIO/AIODiskFile.h,v
> retrieving revision 1.2
> retrieving revision 1.2.14.1
> diff -C2 -d -r1.2 -r1.2.14.1
> *** AIODiskFile.h     21 Aug 2006 01:51:50 -0000      1.2
> --- AIODiskFile.h     25 Aug 2007 03:23:22 -0000      1.2.14.1
> ***************
> *** 51,55 ****
>       AIODiskFile (char const *path, AIODiskIOStrategy *);
>       ~AIODiskFile();
> !     virtual void open (int, mode_t, RefCount<IORequestor>);
>       virtual void create (int, mode_t, RefCount<IORequestor>);
>       virtual void read(ReadRequest *);
> --- 51,58 ----
>       AIODiskFile (char const *path, AIODiskIOStrategy *);
>       ~AIODiskFile();
> ! 
> !     /// \bug the code has this as "IORequestor::Pointer callback"
> !     virtual void open(int flags, mode_t mode, RefCount<IORequestor> 
> callback);
> ! 
>       virtual void create (int, mode_t, RefCount<IORequestor>);
>       virtual void read(ReadRequest *);

HTH,

Alex.


Reply via email to