Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

pat clang 3.2svn on the head #2036

Closed
wants to merge 1 commit into from

3 participants

@ttilley

mark a few private variables as attribute((unused)) to compile with -Werror and the apparently new -Wunused-private-field

fix a logic error in bert where it was negating a boolean and comparing that to an enum rather than comparing against the enum and negating the result of the comparison

@ttilley ttilley pat clang 3.2svn on the head
mark a few private variables as __attribute__((unused)) to compile with -Werror and the apparently new -Wunused-private-field
fix a logic error in bert where it was negating a boolean and comparing that to an enum rather than comparing against the enum and negating the result of the comparison
c943f91
@dbussink dbussink commented on the diff
vm/util/bert.hpp
@@ -895,7 +895,7 @@
Value* new_dict() {
Term* list = tzr_.next_term();
- if(!list->type() == Term::List) {
+ if(!(list->type() == Term::List)) {
@dbussink Owner

we should make this a != then

@ttilley
ttilley added a note

can this individual change be made in master?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@brixen
Owner

The usused warnings need to be investigated. Either clang has a bug or we need to fix some code. I don't want to add attributes like that.

@ttilley

I'll have to re-run with the clang 3.2 rc1 to see if the warnings are less harsh. i do see some chatter about -Wunused-private-field potentially ignoring the implementation? ::shrug::

@dbussink dbussink referenced this pull request from a commit
@dbussink dbussink Cleanup of unused code
Related to #2036
49fd6db
@dbussink dbussink closed this pull request from a commit
@dbussink dbussink Only pass down state into agent components
We can use the state to grab additional stuff when needed.

Fixes #2036
9d9e154
@dbussink dbussink closed this in 9d9e154
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 19, 2012
  1. @ttilley

    pat clang 3.2svn on the head

    ttilley authored
    mark a few private variables as __attribute__((unused)) to compile with -Werror and the apparently new -Wunused-private-field
    fix a logic error in bert where it was negating a boolean and comparing that to an enum rather than comparing against the enum and negating the result of the comparison
This page is out of date. Refresh to see the latest.
View
2  vm/agent_components.cpp
@@ -357,7 +357,7 @@ namespace agent {
class ThreadCount : public DynamicVariable {
SharedState& shared_;
- State* state_;
+ State* state_ __attribute__((unused));
public:
ThreadCount(State* state, SharedState& ss, const char* name)
View
2  vm/agent_components.hpp
@@ -13,7 +13,7 @@ namespace agent {
class Tree;
class Output {
- bert::IOWriter& writer_;
+ bert::IOWriter& writer_ __attribute__((unused));
bert::Encoder<bert::IOWriter> encoder_;
public:
View
4 vm/llvm/jit_visit.hpp
@@ -80,8 +80,8 @@ namespace rubinius {
opcode call_flags_;
// Cached Function*s
- llvm::Function* rbx_simple_send_;
- llvm::Function* rbx_simple_send_private_;
+ llvm::Function* rbx_simple_send_ __attribute__((unused));
+ llvm::Function* rbx_simple_send_private_ __attribute__((unused));
// bail out destinations
llvm::BasicBlock* bail_out_;
View
2  vm/type_info.hpp
@@ -19,7 +19,7 @@ namespace rubinius {
class GCTokenImpl {
private:
- int dummy;
+ int dummy __attribute__((unused));
};
typedef GCTokenImpl& GCToken;
View
2  vm/util/bert.hpp
@@ -895,7 +895,7 @@ namespace bert {
Value* new_dict() {
Term* list = tzr_.next_term();
- if(!list->type() == Term::List) {
+ if(!(list->type() == Term::List)) {
@dbussink Owner

we should make this a != then

@ttilley
ttilley added a note

can this individual change be made in master?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
delete list;
return new_invalid();
}
Something went wrong with that request. Please try again.