You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Igor Galić (JIRA)" <ji...@apache.org> on 2013/01/20 00:52:13 UTC

[jira] [Created] (TS-1662) Remove "register" keyword from code

Igor Galić created TS-1662:
------------------------------

             Summary: Remove "register" keyword from code 
                 Key: TS-1662
                 URL: https://issues.apache.org/jira/browse/TS-1662
             Project: Traffic Server
          Issue Type: Task
          Components: Cleanup
            Reporter: Igor Galić


Here's a quick grep over the code (with some false positives) that contain the register keyword

{noformat}
mgmt/cli/cliParseArg.cc:401:  register cli_ArgvInfo *infoPtr;
mgmt/BaseManager.cc:78: *   Function to register callback's for various management events, such
mgmt/api/EventCallback.cc:178: *        event_name - the event to store the callback for (if NULL, register for all events)
mgmt/api/EventCallback.cc:247: *        event_name - the event to store the callback for (if NULL, register for all events)
mgmt/api/include/mgmtapi.h:1241: * Input:  event_name - the name of event to register callback for;
mgmt/api/remote/APITestCliRemote.cc:74: * register: registers a generic callback (=eventCallbackFn) which
mgmt/api/remote/APITestCliRemote.cc:2400:    } else if (strncmp(buf, "register", 8) == 0) {
mgmt/api/EventControlMain.cc:452: * purpose: handles request to register a callback for a specific event (or all events)
lib/tsconfig/TsConfigSyntax.c:744:	register yy_state_type yy_current_state;
lib/tsconfig/TsConfigSyntax.c:745:	register char *yy_cp, *yy_bp;
lib/tsconfig/TsConfigSyntax.c:746:	register int yy_act;
lib/tsconfig/TsConfigSyntax.c:799:			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
lib/tsconfig/TsConfigSyntax.c:1102:	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
lib/tsconfig/TsConfigSyntax.c:1103:	register char *source = yyg->yytext_ptr;
lib/tsconfig/TsConfigSyntax.c:1104:	register int number_to_move, i;
lib/tsconfig/TsConfigSyntax.c:1236:	register yy_state_type yy_current_state;
lib/tsconfig/TsConfigSyntax.c:1237:	register char *yy_cp;
lib/tsconfig/TsConfigSyntax.c:1245:		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
lib/tsconfig/TsConfigSyntax.c:1270:	register int yy_is_jam;
lib/tsconfig/TsConfigSyntax.c:1272:	register char *yy_cp = yyg->yy_c_buf_p;
lib/tsconfig/TsConfigSyntax.c:1274:	register YY_CHAR yy_c = 1;
lib/tsconfig/TsConfigSyntax.c:2046:	register int i;
lib/tsconfig/TsConfigSyntax.c:2055:	register int n;
lib/records/RecCore.cc:740:    ink_debug_assert(!"Can't register record!");
lib/ts/ink_res_init.cc:305:  register FILE *fp;
lib/ts/ink_res_init.cc:306:  register char *cp, **pp;
lib/ts/ink_res_init.cc:307:  register int n;
lib/ts/ink_resolver.h:205:        register const u_char *t_cp = (const u_char *)(cp); \
lib/ts/ink_resolver.h:215:        register const u_char *t_cp = (const u_char *)(cp); \
lib/ts/ink_resolver.h:227:        register u_int16_t t_s = (u_int16_t)(s); \
lib/ts/ink_resolver.h:228:        register u_char *t_cp = (u_char *)(cp); \
lib/ts/ink_resolver.h:237:        register u_int32_t t_l = (u_int32_t)(l); \
lib/ts/ink_resolver.h:238:        register u_char *t_cp = (u_char *)(cp); \
lib/ts/ink_res_mkquery.cc:103:	register HEADER *hp;
lib/ts/ink_res_mkquery.cc:104:	register u_char *cp, *ep;
lib/ts/ink_res_mkquery.cc:105:	register int n;
lib/ts/ink_string.cc:106:  register char *s, *d;
lib/ts/ink_string.cc:141:  register char *s, *d;
lib/ts/ink_string.h:154:  register char *s, *d;
lib/ts/ink_string.h:181:ink_string_concatenate_two_strings(char *dest, register char *s1, register char *s2)
lib/ts/ink_string.h:183:  register char *d;
CLANG/lib/tsconfig/TsConfigSyntax.c:744:	register yy_state_type yy_current_state;
CLANG/lib/tsconfig/TsConfigSyntax.c:745:	register char *yy_cp, *yy_bp;
CLANG/lib/tsconfig/TsConfigSyntax.c:746:	register int yy_act;
CLANG/lib/tsconfig/TsConfigSyntax.c:799:			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
CLANG/lib/tsconfig/TsConfigSyntax.c:1102:	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
CLANG/lib/tsconfig/TsConfigSyntax.c:1103:	register char *source = yyg->yytext_ptr;
CLANG/lib/tsconfig/TsConfigSyntax.c:1104:	register int number_to_move, i;
CLANG/lib/tsconfig/TsConfigSyntax.c:1236:	register yy_state_type yy_current_state;
CLANG/lib/tsconfig/TsConfigSyntax.c:1237:	register char *yy_cp;
CLANG/lib/tsconfig/TsConfigSyntax.c:1245:		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
CLANG/lib/tsconfig/TsConfigSyntax.c:1270:	register int yy_is_jam;
CLANG/lib/tsconfig/TsConfigSyntax.c:1272:	register char *yy_cp = yyg->yy_c_buf_p;
CLANG/lib/tsconfig/TsConfigSyntax.c:1274:	register YY_CHAR yy_c = 1;
CLANG/lib/tsconfig/TsConfigSyntax.c:2046:	register int i;
CLANG/lib/tsconfig/TsConfigSyntax.c:2055:	register int n;
CLANG/proxy/api/ts/ts.h:213:      set up continuation callbacks. The functions used to register a
tools/http_load/http_load.c:1306:  register long checksum;
tools/http_load/timers.c:61:  register Timer *t2;
tools/http_load/timers.c:62:  register Timer *t2prev;
tools/http_load/timers.c:196:    register Timer *t;
plugins/experimental/hipes/hipes.cc:70:    register unsigned char c = *from;
plugins/experimental/gzip/gzip.cc:711:    fatal("The gzip plugin failed to register");
plugins/experimental/lua/hook.cc:487:  { "register", TSLuaHttpHookRegister },
plugins/experimental/lua/examples/test.lua:24:ts.hook.register(ts.hook.OS_DNS_HOOK,
plugins/experimental/lua/examples/cachestatus.lua:40:ts.hook.register(ts.hook.HTTP_CACHE_LOOKUP_COMPLETE_HOOK,
plugins/experimental/lua/examples/hooks.lua:72:-- Hook the global session start so we can register the per-session events.
plugins/experimental/lua/examples/hooks.lua:73:ts.hook.register(ts.hook.HTTP_SSN_START_HOOK,
plugins/experimental/lua/examples/hooks.lua:76:        ssn:register(events.ssn)
plugins/experimental/lua/examples/hooks.lua:81:-- Hook the global transaction start so we can register the per-transaction events.
plugins/experimental/lua/examples/hooks.lua:82:ts.hook.register(ts.hook.HTTP_TXN_START_HOOK,
plugins/experimental/lua/examples/hooks.lua:85:        txn:register(events.txn)
plugins/experimental/lua/lapi.cc:517:  { "register", LuaHttpTxnRegister },
plugins/experimental/lua/lapi.cc:567:  { "register", LuaHttpSsnRegister },
proxy/CoreUtils.h:211:  * purpose: tests whether a given register is an HttpSM
proxy/http/HttpConfig.h:62:   to enumerate its stats separately and register them with librecords
proxy/http/HttpBodyFactory.cc:381:      Warning("couldn't register variable '%s', is records.config up to date?", config_record_names[i]);
proxy/logging/LogUtils.cc:338:    register unsigned char c = *p;
proxy/logging/LogUtils.cc:383:    register unsigned char c = *from;
proxy/logging/Log.cc:167:  tasks are executed AT LEAST once each period, we'll register a call-back
proxy/logging/LogConfig.h:34:   to enumerate its stats separately and register them with librecords
proxy/logging/LogAccess.cc:656:  register const char *out_buf;
proxy/logging/LogAccess.cc:657:  register unsigned int num_chars;
proxy/logging/LogFieldAliasMap.h:171:      register size_t l = m_table[i].length;
proxy/logging/LogConfig.cc:1254:  This static function is called by Log::init to register the config update
proxy/logging/LogConfig.cc:1349:  This static function is called by Log::init to register the stat update
proxy/logging/LogConfig.cc:1415:  This static function is called by Log::init to register the mgmt callback
proxy/congest/CongestionStats.h:40:   to enumerate its stats separately and register them with librecords
proxy/DiagsConfig.cc:398:                   "couldn't register variable '%s', is records.config up to date?", config_record_names[i]);
proxy/api/ts/ts.h:203:      set up continuation callbacks. The functions used to register a
{noformat}

Register is deprecated: http://en.cppreference.com/w/cpp/language/storage_duration
So I assume no one has looked at this code in a long time. Maybe this cleanup should be an incentive for a code review.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira