diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | translate.cxx | 8 |
2 files changed, 9 insertions, 5 deletions
@@ -1,3 +1,9 @@ + +2008-07-09 <wenji.huang@oracle.com> + + * translate.cxx (visit_comparison): Remove unnecessary comparison. + * translate.cxx (emit_symbol_data): Remove unused local variable. + 2008-07-08 <brolley@redhat.com> * stap-client (client_sysinfo): Use `uname -rvm`. diff --git a/translate.cxx b/translate.cxx index e9dff3c7..557c2f12 100644 --- a/translate.cxx +++ b/translate.cxx @@ -3134,8 +3134,7 @@ c_unparser::visit_comparison (comparison* e) if (e->left->type == pe_string) { - if (e->left->type != pe_string || - e->right->type != pe_string) + if (e->right->type != pe_string) throw semantic_error ("expected string types", e->tok); o->line() << "strncmp ("; @@ -3147,8 +3146,7 @@ c_unparser::visit_comparison (comparison* e) } else if (e->left->type == pe_long) { - if (e->left->type != pe_long || - e->right->type != pe_long) + if (e->right->type != pe_long) throw semantic_error ("expected numeric types", e->tok); o->line() << "(("; @@ -4424,7 +4422,7 @@ emit_symbol_data (systemtap_session& s) // so parse /proc/kallsyms. ifstream kallsyms("/proc/kallsyms"); - string lastaddr, modules_op_addr; + string lastaddr; kallsyms_out << "struct _stp_symbol _stp_kernel_symbols [] = {"; while (! kallsyms.eof()) |