Skip to content

Commit

Permalink
remove spurious parenthesis [gcc8 warning] (closes #841)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Mar 31, 2018
1 parent 78408fa commit c91d78a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
@@ -1,3 +1,10 @@
2018-03-31 Dirk Eddelbuettel <edd@debian.org>

* inst/include/Rcpp/sprintf.h (Rcpp): Remove parens [gcc8 warning]

* vignettes/Rcpp-attributes.Rmd: Update link to JSS intro vignette
* vignettes/Rcpp-modules.Rmd: Idem

2018-03-21 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Roll minor version
Expand Down
5 changes: 5 additions & 0 deletions inst/NEWS.Rd
Expand Up @@ -10,6 +10,11 @@
\item The random number \code{Generator} class no longer inhreits from
\code{RNGScope} (Kevin in \ghpr{837} fixing \ghit{836}).
}
\item Changes in Rcpp Documentation:
\itemize{
\item Two internal links to the introduction published in JSS have been
updated to the changed filename given the newer TAS introduction.
}
}
}

Expand Down
8 changes: 4 additions & 4 deletions inst/include/Rcpp/sprintf.h
Expand Up @@ -2,7 +2,7 @@
//
// sprintf.h: Rcpp R/C++ interface class library -- string formatting
//
// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
// Copyright (C) 2010 - 2018 Dirk Eddelbuettel and Romain Francois
//
// This file is part of Rcpp.
//
Expand All @@ -22,14 +22,14 @@
#include <cstdio>
#include <cstdarg>

namespace Rcpp{
namespace Rcpp {

template <int MAX_SIZE>
std::string sprintf( const char *format, ...) {
static char buffer[MAX_SIZE];
va_list(ap);
va_list ap;
va_start(ap, format);
vsnprintf( buffer, MAX_SIZE, format, ap);
vsnprintf(buffer, MAX_SIZE, format, ap);
va_end(ap);
return buffer ;
}
Expand Down

7 comments on commit c91d78a

@jerryjcgf
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Dirk !
I saw in you code that you remove some parenthesis of code in #841 (if I understood correctly this ticket belong release 0.12.16, right ?!), that was exactly the message found in my code and so I tried to reinstall the Rcpp library inside RStudio and after I did this the error is keeped. When I searched in my OS (Fedora 28) I noted that was about realease 0.12.16. Maybe I miss something, could you help me understand ?

My setup information are:
R version 3.4.4 (2018-03-15)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 28 (Workstation Edition)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
[1] LC_CTYPE=pt_BR.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=C LC_MONETARY=en_US.UTF-8 LC_MESSAGES=pt_BR.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4

Thank you !!

@eddelbuettel
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page describes the change; it has been made here at the source code repo here after 0.12.16 was released and is hence not in 0.12.16 -- but it will be part of the next release 0.12.17.

@jerryjcgf
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for you answer. I love your code in Rcpp and RcppArmadilllo, I'm using it in my master thesis. When you plan release the 0.12.17 ?

@eddelbuettel
Copy link
Member Author

@eddelbuettel eddelbuettel commented on c91d78a May 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been submitted to CRAN; it may take a few days to get released by them. I will likely put a (source release) copy in the Rcpp drat repo from which you can install, or you can just build your own .tar.gz from this github repo.

@jerryjcgf
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I very appreciate the issue of drat. I read the documentations and I'm ready to push from "drat/src/contrib". It's possible for you liberate a preview copy of 0.12.17 there ?

@eddelbuettel
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be 'pull from' the repo; those uploading 'push'. Anyway -- 0.12.17 is there now. But let's end this conversation here as it got a little marginal. Consider asking general Rcpp questions on the rcpp-devel list.

@jerryjcgf
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you a lot Dirk ! I'll tray to pull right now and all next questions or considerations I'll share with all in rccp-devel list.

Please sign in to comment.