Bug#547223: libvorbis: ov_fopen should have const qualifier for char *path
tags 547223 - wontfix tags 547223 + fixed-upstream thanks Dear Sebastian, On Mon, Mar 29, 2010 at 08:10:10AM +0200, Sebastian Dröge wrote: Hi, adding a const qualifier to a function parameter without changing the handling of the parameter (e.g. copying or not copying it inside the function) is no API breakage. Removing the const qualifier would arguably be an API breakage though. Upstream has also made this observation, and fixed the bug. Marking is thus. Thank you! Kumar -- The roots below the earth claim no rewards for making the branches fruitful. - Rabindranath Tagore (Stray Birds, 1916) signature.asc Description: Digital signature
Bug#547223: libvorbis: ov_fopen should have const qualifier for char *path
Hi, adding a const qualifier to a function parameter without changing the handling of the parameter (e.g. copying or not copying it inside the function) is no API breakage. Removing the const qualifier would arguably be an API breakage though. Compilers warn about implicitly removing a const qualifier (passing const char * to a function taking char *) but not about implicitly adding a const qualifier (passing char * to a function taking const char *). signature.asc Description: This is a digitally signed message part
Bug#547223: libvorbis: ov_fopen should have const qualifier for char *path
tags 547223 + wontfix thanks On Thu, Sep 17, 2009 at 03:11:25PM -0500, Kumar Appaiah wrote: As can clearly be seen, char *path is used merely to open the file f. Since fopen requires only a const char * (it doesn't muck around with the path variable), ov_fopen should also have no business in modifying the path variable. Therefore, I'd request that you change the declaration of ov_fopen to: int ov_fopen(const char *path,OggVorbis_File *vf); to be more correct in terms of C style. Upstream (rightly) acknowledged the problem, and said that they would consider fixing it when they could afford an API breakage. So, I take the liberty to mark it as wontfix here; please feel free to handle the bug in a different manner if you feel this is not appropriate. Thanks! Kumar -- I touch God in my song as the hill touched the far-away sea with its waterfall. - Rabindranath Tagore (Fireflies, 1928) signature.asc Description: Digital signature
Bug#547223: libvorbis: ov_fopen should have const qualifier for char *path
Package: libvorbis Version: 1.2.0.dfsg-6 Severity: minor Tags: upstream, patch Dear libvorbis maintainers, I was looking at the implementation of the ov_fopen function. Currently, the implementation is: int ov_fopen(char *path,OggVorbis_File *vf) { int ret; FILE *f = fopen(path,rb); if(!f) return -1; ret = ov_open(f,vf,NULL,0); if(ret) fclose(f); return ret; } As can clearly be seen, char *path is used merely to open the file f. Since fopen requires only a const char * (it doesn't muck around with the path variable), ov_fopen should also have no business in modifying the path variable. Therefore, I'd request that you change the declaration of ov_fopen to: int ov_fopen(const char *path,OggVorbis_File *vf); to be more correct in terms of C style. Thanks. Kumar -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org