Giter VIP home page Giter VIP logo

Comments (6)

mondus avatar mondus commented on September 23, 2024 1

This is annoying. Should use the following fix in all places.

#endif //__VISUALISATION

It is good practice to label the endif macros if they span large numbers of lines.

from flamegpu.

ptheywood avatar ptheywood commented on September 23, 2024

Any functions into which you pass string literals "I am a string literal" should use char const * as the type instead of char*.

https://stackoverflow.com/questions/59670/how-to-get-rid-of-deprecated-conversion-from-string-constant-to-char-warnin

#endif __VISUALISATION to #endif // __VISUALISATION

Might be dependant on gcc version

from flamegpu.

ptheywood avatar ptheywood commented on September 23, 2024

I'm getting these warnings on Ubuntu 16.10, with g++ 4.9.4 for the Sugarscape example.

from flamegpu.

ptheywood avatar ptheywood commented on September 23, 2024

With -Wall, i've spotted a set of extra warnings reported by gcc / g++.

src/dynamic/simulation.cu:20:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning(push)
 ^
src/dynamic/simulation.cu:21:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning (disable : 4267)
 ^
src/dynamic/simulation.cu:22:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning (disable : 4244)
 ^
src/dynamic/simulation.cu:42:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning(pop)
 ^

caused by the following code in simulation.xslt

#pragma warning(push)
#pragma warning (disable : 4267)
#pragma warning (disable : 4244)

These pragmas do not directly effect the code, but suppress the related warnigs in msvc.
We should probably add the gcc equivalents and wrap the appropriate pragmas in ifdefs which capture the appropriate compiler.

from flamegpu.

ptheywood avatar ptheywood commented on September 23, 2024

a842d10 resolves the #pragma issue, this will be resolved when #108 is merged

from flamegpu.

ptheywood avatar ptheywood commented on September 23, 2024

when specifying higher compilation levels on windows (/W4 or /Wall) additional warnings are produced.

Wall on windows produces hundreds of (in my opinion, and others) pointless warnings, so W4 is the saner alternative for high levels of warnings.

W4 does produce a much saner set of warnings, but still includes some excessive warnings, such as the following:

# many thrust / cub warnings
# ...
c:\users\ptheywood\code\flamegpu\examples\gameoflife\src\dynamic\header.h(91): warning C4324: 'xmachine_memory_cell': structure was padded due to alignment specifier
c:\users\ptheywood\code\flamegpu\examples\gameoflife\src\dynamic\FLAMEGPU_kernals.cu(557): warning C4505: 'RNG_rand48_iterate_single': unreferenced local function has been removed
src/dynamic/main.cu(39): warning C4100: 'argv': unreferenced formal parameter

In Visual studio projects, we currently use W3, so the same will be applied to the Makefiles on windows (and the above warnings don't need the appropriate #pragma adding).

from flamegpu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.