Commit d566226
committed
#380 Fix compilation error and logic bug in mosaic_util.nc
This change resolves a build failure in mosaic_util.c where
a static const double array (m[3][3])was being initialized
with variables calculated at runtime. Standard C requires static
variables to be initialized with compile-time constants,
which caused GCC to throw an "initializer element is not constant" error.
Removing the static keyword not only fixes the compilation issue but also corrects a likely logic bug. As an automatic local variable, the rotation matrix will now accurately populate with fresh, updated values on every function call, ensuring mathematical correctness and thread safety.1 parent 0fe3e5a commit d566226
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1691 | 1691 | | |
1692 | 1692 | | |
1693 | 1693 | | |
1694 | | - | |
1695 | | - | |
1696 | | - | |
1697 | | - | |
1698 | | - | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
1699 | 1699 | | |
1700 | | - | |
| 1700 | + | |
1701 | 1701 | | |
1702 | 1702 | | |
1703 | 1703 | | |
| |||
0 commit comments