On Wed, 2011-09-07 at 20:06 +0300, Einar Rünkaru wrote: > On Tue, Sep 6, 2011 at 10:32 PM, Paul Taggart <[email protected]> wrote: > > Attached is a rather massive patch to apply against the "stable" version > > of Cinelerra-cv. The patch cleans up calls to depreciated functions in > > alsa, fixes a number of typos (like assigning a single byte unsigned > > variable a value of 256 instead of 255), > > Ok > > > over 10,000 additions of (char*) to text strings where g++ warned of it > > being a depreciated > > conversion. > > It is wrong. You have to use 'const char*' in places where you use > these strings. > This enables compiler to store only one copy of identical texts and > identifie places where someone tries to modify string constant (it is > a bug). I have done this in my branch.
No, this is not a bug. the called functions are looking for a pointer to a string (char *). By just providing a quoted string, you are providing the function with the entire string, not just the pointer. The compiler recognizes this discrepancy and automatically creates the pointer but unlike gcc which has the default option -Wno-write-strings, g++ defaults to -Wwrite-strings which issues a warning message : "warning: deprecated conversion from string constant to ‘char*’" for each occurrence. The easy fix would be to add -Wno-write-strings to CXXFLAGS in all of the Makefiles (can be set in configure.in) but I'm a bit of a purest who believes its better to fix the problem than to mask it. 'const char *' does not fix the problem but 'char *const' does but that is redundant with a quoted string since it is a constant by default. > > > > FFMPEG version 0.8 required a number of changes that are reflected in > > other patches but I've also added a fix to fileac3.C to fix ffmpeg's > > change to the ac3 codec to be only floating-point. A new codec, or at > > least a renaming of the old codec, ac3_fixed and a few other statements > > to allow ac3 rendering to work. > > Ok. But I have seen similar patch already. > > > > > videodev.h needs to be added to the cinelerra subdirectory. > > > > No. Never include a system header into an application. There will be > some solution in the next official version of cinelerra. I see that you have a patch to remove Iomega Buz. Is there any way of getting the complete patch (diff) file in a usable format? The change updates 27 files and I would prefer to work with the changes, not files that may have other updates that I'm not aware of. Removing Video4Linux (v4l) and buz and changing vdevicev4l2.h to point to <linux/videodev2.h> eliminates the need for videodev.h. > > > On another note, the Fedora distribution uses a broken version of the > > Einar build that causes a problem when rebuilding from source. Somehow > > the audio buffer size (in .bcast directory) gets set to zero which > > causes the stable version to crash when attempting to playback a video. > > a) my version is experimental and recommended only for person wanting > to help to develop and debug this. > Of course it is possible sometimes to render a project with this :) > b) officially: bacward compatibility is one way - newer version reads > projects and configuration files of an older version, no efforts will > be made to make any files suitable for older versions > c) It is a feature of my branch. Audio buffer size zero means that > cinelerra calculates size of audio buffer automatically. > > Do not send huge patches fixing everything. Please send smaller > patches fixing one problem a time. > I can send a patch to fix just the "warning: deprecated conversion from string constant to ‘char*’" messages but it will still update about 75% of the C++ programs. How would you like it packaged? That one issue alone is probably 90% of the patch I sent. > Thank you for the patch, but it is not usable. > > Einar > > _______________________________________________ > Cinelerra mailing list > [email protected] > https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
