MoL: Avoid empty array

Issue #2783 open
Erik Schnetter created an issue

Automatic C arrays cannot be empty. Use a size-1 array instead if necessary.

See https://bitbucket.org/cactuscode/cactusnumerical/pull-requests/21

Found by enabling run-time compiler checks in debug mode.

Comments (3)

  1. Roland Haas

    I’d add a comment describing this to the code, otherwise a future reader may wonder why the size of 1 is needed or put the whole block into a if(nsrsc > 0) {...} block which makes the reason explicit in code but is a larger and possibly hard to do (if the extra scope causes issues) change.

  2. Log in to comment