-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix C warnings #4
Comments
Related to the pointer stuff: https://cboard.cprogramming.com/c-programming/24898-problem-incompatible-pointer-type.html |
I have no time to do this now. As everything works very well this is of minor importance now; just prevents us from sending the package to CRAN. |
The warnings here:
are fixed by the uncommenting these parts of the code: Line 32 in 4a354a7
Line 11 in 4a354a7
I also checked it and it works. So you already have the solution to this. 👍 |
@hkumar6 Thank you so much! 😀 I really appreciate your support. |
@jakobbossek You're welcome!
These errors occur because the indicated native C functions are used which causes conflicts when launched inside an R session. That is what the last line of the error explains. |
Yep, I know how to fix these warnings, but I was too lazy to implement the necessary changes 😅
Would be awesome! Thanks! |
I have no idea how to solve
incompatible pointer types passing
warnings.── R CMD check ─────────────────────────────────────────────────────────────────
─ using log directory ‘/private/var/folders/lr/g4jxbpys6z54qrs4ppyln72c0000gn/T/rcheck-sampling-20191218-222222/sampling.Rcheck’ (339ms)
─ using R version 3.5.2 (2018-12-20)
─ using platform: x86_64-apple-darwin15.6.0 (64-bit)
─ using session charset: UTF-8
✔ checking for file ‘sampling/DESCRIPTION’ ...
─ this is package ‘sampling’ version ‘1.0.0.0000’
─ package encoding: UTF-8
✔ checking package namespace information
✔ checking package dependencies (6.1s)
✔ checking if this is a source package
✔ checking if there is a namespace
✔ checking for executable files ...
✔ checking for hidden files and directories
✔ checking for portable file names
✔ checking for sufficient/correct file permissions
W checking whether package ‘sampling’ can be installed (3.7s)
Found the following significant warnings:
bz_discr.c:85:48: warning: incompatible pointer types passing 'int (double **, double *)' to parameter of type 'int ( _Nonnull)(const void *, const void *)' [-Wincompatible-pointer-types]
dem_discr.c:101:59: warning: incompatible pointer types passing 'int (double *, double )' to parameter of type 'int ( _Nonnull)(const void *, const void *)' [-Wincompatible-pointer-types]
dem_discr.c:229:48: warning: incompatible pointer types passing 'int (double **, double *)' to parameter of type 'int ( _Nonnull)(const void *, const void *)' [-Wincompatible-pointer-types]
dem_discr.c:230:44: warning: incompatible pointer types passing 'int (double **, double *)' to parameter of type 'int ( _Nonnull)(const void *, const void *)' [-Wincompatible-pointer-types]
dem_discr.c:292:52: warning: incompatible pointer types passing 'int (double **, double *)' to parameter of type 'int ( _Nonnull)(const void *, const void *)' [-Wincompatible-pointer-types]
See ‘/private/var/folders/lr/g4jxbpys6z54qrs4ppyln72c0000gn/T/rcheck-sampling-20191218-222222/sampling.Rcheck/00install.out’ for details.
✔ checking installed package size ...
✔ checking package directory
✔ checking DESCRIPTION meta-information (369ms)
✔ checking top-level files
✔ checking for left-over files
✔ checking index information
✔ checking package subdirectories ...
✔ checking R files for non-ASCII characters ...
✔ checking R files for syntax errors ...
✔ checking whether the package can be loaded ...
✔ checking whether the package can be loaded with stated dependencies ...
✔ checking whether the package can be unloaded cleanly ...
✔ checking whether the namespace can be loaded with stated dependencies ...
✔ checking whether the namespace can be unloaded cleanly ...
✔ checking loading without being on the library search path ...
✔ checking dependencies in R code (350ms)
✔ checking S3 generic/method consistency (533ms)
✔ checking replacement functions ...
✔ checking foreign function calls ...
✔ checking R code for possible problems (1.3s)
✔ checking Rd files ...
✔ checking Rd metadata ...
✔ checking Rd cross-references ...
✔ checking for missing documentation entries ...
✔ checking for code/documentation mismatches (752ms)
✔ checking Rd \usage sections (788ms)
✔ checking Rd contents ...
✔ checking for unstated dependencies in examples ...
✔ checking line endings in C/C++/Fortran sources/headers
W checking compiled code ...
File ‘sampling/libs/sampling.so’:
Found ‘___stderrp’, possibly from ‘stderr’ (C)
Objects: ‘TA_common.o’, ‘TA_shrink_bardelta.o’,
‘TA_shrink_delta.o’, ‘bz_discr.o’, ‘dem_discr.o’,
‘simple_discr.o’
Found ‘___stdoutp’, possibly from ‘stdout’ (C)
Objects: ‘TA_shrink_bardelta.o’, ‘TA_shrink_delta.o’
Found ‘_abort’, possibly from ‘abort’ (C)
Objects: ‘TA_common.o’, ‘dem_discr.o’
Found ‘_rand’, possibly from ‘rand’ (C)
Object: ‘TA_common.o’
Found ‘_random’, possibly from ‘random’ (C)
Objects: ‘TA_common.o’, ‘simple_discr.o’
Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor use Fortran I/O
nor system RNGs.
The text was updated successfully, but these errors were encountered: