diff --git a/tools/bifcl/builtin-func.l b/tools/bifcl/builtin-func.l index 8f0468ceab..6d31f9613a 100644 --- a/tools/bifcl/builtin-func.l +++ b/tools/bifcl/builtin-func.l @@ -255,7 +255,7 @@ void init_alternative_mode() static char name[1024]; strncpy(name, input_filename, sizeof(name) - 1); - name[sizeof(name) - 1] = 0; + name[sizeof(name) - 1] = '\0'; char* dot = strchr(name, '.'); if ( dot ) *dot = '\0'; @@ -264,7 +264,7 @@ void init_alternative_mode() { static char plugin_canon[1024]; strncpy(plugin_canon, plugin, sizeof(plugin_canon) - 1); - plugin_canon[sizeof(plugin_canon) - 1] = 0; + plugin_canon[sizeof(plugin_canon) - 1] = '\0'; char* colon = strstr(plugin_canon, "::"); if ( colon ) { @@ -355,10 +355,9 @@ int main(int argc, char* argv[]) for ( int i = optind; i < argc; i++ ) { FILE* fp_input; - char* slash; input_filename = input_filename_with_path = argv[i]; - slash = strrchr(input_filename, '/'); + char* slash = strrchr(input_filename, '/'); if ( (fp_input = fopen(input_filename, "r")) == NULL ) { diff --git a/tools/bifcl/builtin-func.y b/tools/bifcl/builtin-func.y index 365ff15bd3..66ef357d05 100644 --- a/tools/bifcl/builtin-func.y +++ b/tools/bifcl/builtin-func.y @@ -4,8 +4,6 @@ #include #include -using namespace std; - #include #include diff --git a/tools/bifcl/include/bif_arg.h b/tools/bifcl/include/bif_arg.h index 4ca9de0d21..588f1d60d2 100644 --- a/tools/bifcl/include/bif_arg.h +++ b/tools/bifcl/include/bif_arg.h @@ -13,7 +13,7 @@ enum builtin_func_arg_type extern const char* builtin_func_arg_type_bro_name[]; -class BuiltinFuncArg +class BuiltinFuncArg final { public: BuiltinFuncArg(const char* arg_name, int arg_type); @@ -29,7 +29,7 @@ public: void PrintCArg(FILE* fp, int n); void PrintValConstructor(FILE* fp); -protected: +private: const char* name; int type; const char* type_str;