This is an automated email from the ASF dual-hosted git repository.
wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 7abda6d ARROW-3527: [R] remove unused variables
7abda6d is described below
commit 7abda6d089845045b39606d4f7a30f4d19f5622c
Author: James Lamb <[email protected]>
AuthorDate: Tue Oct 16 21:51:44 2018 -0400
ARROW-3527: [R] remove unused variables
I'm so excited about the Arrow R package! Started working with it tonight
to see where I may be able to help.
While doing this, I noticed a few "unused variable" compiler warnings.
```
DataType.cpp:118:7: warning: unused variable 'n' [-Wunused-variable]
int n = x.size();
RecordBatch.cpp:132:7: warning: unused variable 'nc' [-Wunused-variable]
int nc = tbl.size();
```
Please consider this PR to remove the offending lines.
Author: James Lamb <[email protected]>
Closes #2768 from jameslamb/unused_variables and squashes the following
commits:
bee588390 <James Lamb> ARROW-3527: remove unused variables
---
r/src/DataType.cpp | 1 -
r/src/RecordBatch.cpp | 1 -
2 files changed, 2 deletions(-)
diff --git a/r/src/DataType.cpp b/r/src/DataType.cpp
index bd0b4b9..ab9351b 100644
--- a/r/src/DataType.cpp
+++ b/r/src/DataType.cpp
@@ -115,7 +115,6 @@ SEXP list__(SEXP x) {
template <typename T>
std::vector<std::shared_ptr<T>> List_to_shared_ptr_vector(List x) {
- int n = x.size();
std::vector<std::shared_ptr<T>> vec;
for (SEXP element : x) {
vec.push_back(as<std::shared_ptr<T>>(element));
diff --git a/r/src/RecordBatch.cpp b/r/src/RecordBatch.cpp
index 2dd47d2..cd05bc0 100644
--- a/r/src/RecordBatch.cpp
+++ b/r/src/RecordBatch.cpp
@@ -129,7 +129,6 @@ std::shared_ptr<arrow::RecordBatch>
RecordBatch__from_dataframe(DataFrame tbl) {
std::vector<std::shared_ptr<arrow::Field>> fields;
std::vector<std::shared_ptr<arrow::Array>> arrays;
- int nc = tbl.size();
for (int i = 0; i < tbl.size(); i++) {
arrays.push_back(Array__from_vector(tbl[i]));
fields.push_back(