Print this page
12724 update smatch to 0.6.1-rc1-il-5

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/smatch_kernel_user_data.c
          +++ new/usr/src/tools/smatch/src/smatch_kernel_user_data.c
↓ open down ↓ 1059 lines elided ↑ open up ↑
1060 1060                  i++;
1061 1061                  type = get_arg_type(expr->fn, i);
1062 1062                  str = get_user_rl_str(arg, type);
1063 1063                  if (!str)
1064 1064                          continue;
1065 1065  
1066 1066                  sql_insert_caller_info(expr, USER_DATA, i, "$", str);
1067 1067          } END_FOR_EACH_PTR(arg);
1068 1068  }
1069 1069  
1070      -static int is_struct_ptr(struct symbol *sym)
1071      -{
1072      -        struct symbol *type;
1073      -
1074      -        if (!sym)
1075      -                return 0;
1076      -        type = get_real_base_type(sym);
1077      -        if (!type || type->type != SYM_PTR)
1078      -                return 0;
1079      -        type = get_real_base_type(type);
1080      -        if (!type || type->type != SYM_STRUCT)
1081      -                return 0;
1082      -        return 1;
1083      -}
1084      -
1085 1070  static void struct_member_callback(struct expression *call, int param, char *printed_name, struct sm_state *sm)
1086 1071  {
1087 1072          struct smatch_state *state;
1088 1073          struct range_list *rl;
1089 1074          struct symbol *type;
1090 1075          char buf[64];
1091 1076  
1092 1077          /*
1093 1078           * Smatch uses a hack where if we get an unsigned long we say it's
1094 1079           * both user data and it points to user data.  But if we pass it to a
↓ open down ↓ 460 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX