zippy / ceptr

(a recomposable medium for distributed social computing) || (semantic self-describing protocol stacks)
http://ceptr.org
GNU General Public License v3.0
89 stars 17 forks source link

build error on Mac OS X #2

Closed thosmos closed 9 years ago

thosmos commented 9 years ago

Topaz:ceptr thomas$ make rm -rf ceptrspecs .o ceptr_spec.dSYM gcc -pthread -g -o ceptrspecs spec/.c src/.c In file included from spec/ceptr_specs.c:18: spec/semtrex_spec.h:168:31: warning: too many arguments in call to '_makeTestSemtrex1' T s = _makeTestSemtrex1(t);


In file included from spec/ceptr_specs.c:19:
spec/receptor_spec.h:146:26: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    spec_is_true(matched = _t_matchr(req,signal_contents,&result));
                 ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
spec/test_framework.h:22:42: note: expanded from macro 'spec_is_true'
# define spec_is_true(x) spec_total++;if (x){putchar('.');} else {putchar('F');sprintf(failures[spec_failures++],"%s:%d expected %...

```
                                     ^
```

spec/receptor_spec.h:146:26: note: place parentheses around the assignment to silence this warning
    spec_is_true(matched = _t_matchr(req,signal_contents,&result));
                         ^
                 (
spec/test_framework.h:22:42: note: expanded from macro 'spec_is_true'
# define spec_is_true(x) spec_total++;if (x){putchar('.');} else {putchar('F');sprintf(failures[spec_failures++],"%s:%d expected %...

```
                                     ^
```

spec/receptor_spec.h:146:26: note: use '==' to turn this assignment into an equality comparison
    spec_is_true(matched = _t_matchr(req,signal_contents,&result));
                         ^
                         ==
spec/test_framework.h:22:42: note: expanded from macro 'spec_is_true'
# define spec_is_true(x) spec_total++;if (x){putchar('.');} else {putchar('F');sprintf(failures[spec_failures++],"%s:%d expected %...

```
                                     ^
```

spec/ceptr_specs.c:32:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if (err = setjmp(G_err)) {
        ~~~~^~~~~~~~~~~~~~~
spec/ceptr_specs.c:32:13: note: place parentheses around the assignment to silence this warning
    if (err = setjmp(G_err)) {
            ^
        (                  )
spec/ceptr_specs.c:32:13: note: use '==' to turn this assignment into an equality comparison
    if (err = setjmp(G_err)) {
            ^
            ==
spec/ceptr_specs.c:36:2: warning: implicit declaration of function 'def_sys' is invalid in C99 [-Wimplicit-function-declaration]
        def_sys();
        ^
spec/ceptr_specs.c:47:2: warning: implicit declaration of function 'sys_free' is invalid in C99 [-Wimplicit-function-declaration]
        sys_free();
        ^
5 warnings generated.
src/def.c:249:1: warning: control may reach end of non-void function [-Wreturn-type]
}
^
1 warning generated.
src/process.c:108:25: error: non-void function '__p_reduce' should return a value [-Wreturn-type]
    if (!is_process(s)) return;
                        ^
1 error generated.
src/semtrex.c:310:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
__stx_freeFA2(SState _s) {
^~~~~~~~~~~~~
src/semtrex.c:320:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
src/semtrex.c:629:11: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
                if (_rP = stack[depth].match) {
                    ~~~~^~~~~~~~~~~~~~~~~~~~
src/semtrex.c:629:11: note: place parentheses around the assignment to silence this warning
                if (_rP = stack[depth].match) {
                        ^
                    (                       )
src/semtrex.c:629:11: note: use '==' to turn this assignment into an equality comparison
                if (_rP = stack[depth].match) {
                        ^
                        ==
src/semtrex.c:653:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
                            if (t = _t_next_sibling(p)) break;
                                ~~^~~~~~~~~~~~~~~~~~~~
src/semtrex.c:653:14: note: place parentheses around the assignment to silence this warning
                            if (t = _t_next_sibling(p)) break;
                                  ^
                                (                     )
src/semtrex.c:653:14: note: use '==' to turn this assignment into an equality comparison
                            if (t = _t_next_sibling(p)) break;
                                  ^
                                  ==
src/semtrex.c:680:12: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
            if (r = stack[depth].match) {
                ~~^~~~~~~~~~~~~~~~~~~~
src/semtrex.c:680:12: note: place parentheses around the assignment to silence this warning
            if (r = stack[depth].match) {
                  ^
                (                     )
src/semtrex.c:680:12: note: use '==' to turn this assignment into an equality comparison
            if (r = stack[depth].match) {
                  ^
                  ==
5 warnings generated.
src/tree.c:389:6: warning: implicit declaration of function '_r_free' is invalid in C99 [-Wimplicit-function-declaration]
            _r_free((Receptor _)t->contents.surface);
            ^
src/tree.c:394:2: warning: implicit declaration of function '_s_free' is invalid in C99 [-Wimplicit-function-declaration]
        _s_free((Scape *)t->contents.surface);
        ^
src/tree.c:806:9: warning: implicit declaration of function '_sys_structure_size' is invalid in C99 [-Wimplicit-function-declaration]
        size = _sys_structure_size(st.id,_surfaceP);
               ^
3 warnings generated.
make: **\* [ceptr_specs] Error 1
zippy commented 9 years ago

Thanks Thomas,

Currently I build against standard c (not c99) so I haven't seen those warnings. I'll get them fixed. The one error you can fix just by declaring the function void.

zippy commented 9 years ago

These should now all be fixed.