arc80/plywood

CLANG found a mistake in WeakRef.h

Closed this issue · 2 comments

Trying to build plywood on Android with termux using clang11 we get this warning message that flags a possible mistake of using && instead of &:

In file included from plywood-dad/data/build/bootstrap/plytool/src/pylon/pylon/pylon/Node.cpp:5:
In file included from plywood-dad/data/build/bootstrap/plytool/src/pylon/pylon/pylon/Core.h:6:
In file included from plywood-dad/data/build/bootstrap/plytool/src/runtime/ply-runtime/Base.h:23:
plywood-dad/data/build/bootstrap/plytool/src/runtime/ply-runtime/container/WeakRef.h:57:45: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
        return m_dualRefCount.load(Relaxed) && 0xffffu;
                                            ^  ~~~~~~~
plywood-dad/data/build/bootstrap/plytool/src/runtime/ply-runtime/container/WeakRef.h:57:45: note: use '&' for a bitwise operation
        return m_dualRefCount.load(Relaxed) && 0xffffu;
                                            ^~
                                            &
plywood-dad/data/build/bootstrap/plytool/src/runtime/ply-runtime/container/WeakRef.h:57:45: note: remove constant to silence this warning
        return m_dualRefCount.load(Relaxed) && 0xffffu;
                                           ~^~~~~~~~~~

Also on Android with termux there is no libsass package.
What is the alternative way to add libsass as a repository and build it ?

Nice catch. WeakRef isn't used in any open source code yet, but I use it in my game engine.

What is the alternative way to add libsass as a repository and build it ?

I haven't exposed such a way. It's possible but perhaps complicated for someone unfamiliar with Plywood at this point in time. If you avoid building the documentation on Android you shouldn't need it.