[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43589] trunk/blender/source/blender/ editors/object/object_add.c: fix for last commit - declarations must be in the begin of the block (C, tsc tsc)

Campbell Barton ideasman42 at gmail.com
Sun Jan 22 04:03:40 CET 2012


odd, this shouldn't be allowed, see CMakeLists.txt:1424

if(CMAKE_COMPILER_IS_GNUCC)
# --- snip
    ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS
C_WARN_ERROR_DECLARATION_AFTER_STATEMENT
-Werror=declaration-after-statement)

Unless the gcc version doesn't support this argument.

On Sun, Jan 22, 2012 at 12:29 PM, Dalai Felinto <dfelinto at gmail.com> wrote:
> I actually built on OSX with cmake+make (using framework gcc I think).
> So we need to expand the disallowance to osx as well I guess.
>
> 2012/1/21 Campbell Barton <ideasman42 at gmail.com>
>
>> We should have MSVC compiler warnings set up to disallow this as with GCC.
>>
>> On Sun, Jan 22, 2012 at 11:49 AM, Dalai Felinto <dfelinto at gmail.com>
>> wrote:
>> > Revision: 43589
>> >
>> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43589
>> > Author:   dfelinto
>> > Date:     2012-01-22 00:49:12 +0000 (Sun, 22 Jan 2012)
>> > Log Message:
>> > -----------
>> > fix for last commit - declarations must be in the begin of the block (C,
>> tsc tsc)
>> >
>> > Modified Paths:
>> > --------------
>> >    trunk/blender/source/blender/editors/object/object_add.c
>> >
>> > Modified: trunk/blender/source/blender/editors/object/object_add.c
>> > ===================================================================
>> > --- trunk/blender/source/blender/editors/object/object_add.c    2012-01-21
>> 23:57:28 UTC (rev 43588)
>> > +++ trunk/blender/source/blender/editors/object/object_add.c    2012-01-22
>> 00:49:12 UTC (rev 43589)
>> > @@ -1790,13 +1790,13 @@
>> >                /* check if obdata is copied */
>> >                if(didit) {
>> >                        Key *key = ob_get_key(obn);
>> > +                       bActuator *act;
>> >
>> >                        if(dupflag & USER_DUP_ACT) {
>> >                                BKE_copy_animdata_id_action((ID
>> *)obn->data);
>> >                                if(key)
>> BKE_copy_animdata_id_action((ID*)key);
>> >
>> >                                /* Update the duplicated action in the
>> action actuators */
>> > -                               bActuator *act;
>> >                                for (act= obn->actuators.first; act; act=
>> act->next) {
>> >                                        if(act->type == ACT_ACTION) {
>> >                                                bActionActuator* actact =
>> (bActionActuator*) act->data;
>> >
>> > _______________________________________________
>> > Bf-blender-cvs mailing list
>> > Bf-blender-cvs at blender.org
>> > http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>>
>>
>>
>> --
>> - Campbell
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers



-- 
- Campbell


More information about the Bf-committers mailing list