提交 03383880 编写于 作者: B Bernard Xiong

Merge pull request #398 from grissiom/misc-fix

Misc fix
...@@ -417,7 +417,7 @@ rt_object_t rt_object_find(const char *name, rt_uint8_t type) ...@@ -417,7 +417,7 @@ rt_object_t rt_object_find(const char *name, rt_uint8_t type)
{ {
const char *name_ptr; const char *name_ptr;
int module_name_length; int module_name_length;
name_ptr = name; name_ptr = name;
while ((*name_ptr != '\0') && (*name_ptr != '/')) while ((*name_ptr != '\0') && (*name_ptr != '/'))
name_ptr ++; name_ptr ++;
...@@ -434,13 +434,13 @@ rt_object_t rt_object_find(const char *name, rt_uint8_t type) ...@@ -434,13 +434,13 @@ rt_object_t rt_object_find(const char *name, rt_uint8_t type)
/* find module */ /* find module */
information = &rt_object_container[RT_Object_Class_Module]; information = &rt_object_container[RT_Object_Class_Module];
for (node = information->object_list.next; for (node = information->object_list.next;
node != &(information->object_list); node != &(information->object_list);
node = node->next) node = node->next)
{ {
object = rt_list_entry(node, struct rt_object, list); object = rt_list_entry(node, struct rt_object, list);
if ((rt_strncmp(object->name, name, module_name_length) == 0) && if ((rt_strncmp(object->name, name, module_name_length) == 0) &&
module_name_length == RT_NAME_MAX || object->name[module_name_length] == '\0') (module_name_length == RT_NAME_MAX || object->name[module_name_length] == '\0'))
{ {
/* get module */ /* get module */
module = (struct rt_module*)object; module = (struct rt_module*)object;
...@@ -450,7 +450,7 @@ rt_object_t rt_object_find(const char *name, rt_uint8_t type) ...@@ -450,7 +450,7 @@ rt_object_t rt_object_find(const char *name, rt_uint8_t type)
rt_exit_critical(); rt_exit_critical();
/* there is no this module inside the system */ /* there is no this module inside the system */
if (module == RT_NULL) return RT_NULL; if (module == RT_NULL) return RT_NULL;
/* get the object pool of module */ /* get the object pool of module */
information = &(module->module_object[type]); information = &(module->module_object[type]);
......
...@@ -33,7 +33,7 @@ def generate(env): ...@@ -33,7 +33,7 @@ def generate(env):
env['AR'] = 'true' env['AR'] = 'true'
env['LINK'] = 'true' env['LINK'] = 'true'
env['CFLAGS'] = ['-fsyntax-only', '-Wall', '-Wno-invalid-source-encoding'] env['CFLAGS'] = ['-fsyntax-only', '-Wall', '-Wno-invalid-source-encoding', '-m32']
env['LINKFLAGS'] = '-Wl,--gc-sections' env['LINKFLAGS'] = '-Wl,--gc-sections'
env['ARFLAGS'] = '-rc' env['ARFLAGS'] = '-rc'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册