Skip to content

Compiler warning(s) #72

@serkor1

Description

@serkor1

📚 What?

After PR #71 the compiler is complaining about unused variables in lookback-functions:

ta_WMA.c: In function ‘impl_ta_WMA_lookback’:
   ta_WMA.c:40:17: warning: unused variable ‘inReal_ptr’ [-Wunused-variable]
      40 |   const double *inReal_ptr = REAL(inReal);
         |                 ^~~~~~~~~~
   ta_WMA.c:37:7: warning: unused variable ‘n’ [-Wunused-variable]
      37 |   int n = LENGTH(inReal);
         |       ^

The general rule is this: Don't fight the compiler.

📋 TODO

Consider the following solution(s):

  • Ignore the compiler.
  • Fight the compiler.
  • Construct a lookback-specific template and pass only relevant arguments to .Call() and ditch irrelevant one; without breaking the R function signature.

If memory serves me right, then compiler warnings should have made the CI/CD-runs fail for some compilers and OS (especially MacOS). But that was when R-CMD-check was used without r-universe.

Important

Going forward apply strict rules to the 'C'-side and make everything fail if there is warnings (regardless of its severity.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions