Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more errors ... #9

Closed
ghost opened this issue Sep 29, 2014 · 2 comments
Closed

more errors ... #9

ghost opened this issue Sep 29, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 29, 2014

gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-pc-linux-gnu/4.6.4/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ./configure --prefix=/usr
Thread model: posix
gcc version 4.6.4 (GCC)

make | grep warning

jsarray.c: In function 'Ap_join':
jsarray.c:95:14: warning: variable 'sep' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
jsarray.c:97:15: warning: variable 'seplen' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
jsdump.c: In function 'js_dumpvalue':
jsdump.c:808:3: warning: format '%p' expects argument of type 'void *', but argument 2 has type 'struct js_Object *' [-Wformat]
jsdump.c:809:3: warning: format '%p' expects argument of type 'void *', but argument 2 has type 'struct js_Object *' [-Wformat]
jsdump.c:815:5: warning: format '%p' expects argument of type 'void *', but argument 2 has type 'struct js_Object *' [-Wformat]
jsdump.c:818:3: warning: format '%p' expects argument of type 'void *', but argument 2 has type 'js_CFunction' [-Wformat]
jsdump.c:823:3: warning: format '%p' expects argument of type 'void *', but argument 2 has type 'struct js_Object *' [-Wformat]
jsdump.c:827:3: warning: format '%p' expects argument of type 'void *', but argument 2 has type 'struct js_Object *' [-Wformat]
jsfunction.c: In function 'jsB_Function':
jsfunction.c:11:14: warning: variable 'body' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
jsstring.c: In function 'Sp_concat':
jsstring.c:103:15: warning: variable 'n' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
regex.c: In function 'compile':
regex.c:686:14: warning: 'inst' may be used uninitialized in this function [-Wuninitialized]
regex.c: In function 'lex':
regex.c:279:13: warning: 'save' may be used uninitialized in this function [-Wuninitialized]
regex.c:248:7: note: 'save' was declared here
In file included from one.c:7:0:
jsdump.c: In function 'js_dumpvalue':
jsdump.c:808:3: warning: format '%p' expects argument of type 'void *', but argument 2 has type 'struct js_Object *' [-Wformat]
jsdump.c:809:3: warning: format '%p' expects argument of type 'void *', but argument 2 has type 'struct js_Object *' [-Wformat]
jsdump.c:815:5: warning: format '%p' expects argument of type 'void *', but argument 2 has type 'struct js_Object *' [-Wformat]
jsdump.c:818:3: warning: format '%p' expects argument of type 'void *', but argument 2 has type 'js_CFunction' [-Wformat]
jsdump.c:823:3: warning: format '%p' expects argument of type 'void *', but argument 2 has type 'struct js_Object *' [-Wformat]
jsdump.c:827:3: warning: format '%p' expects argument of type 'void *', but argument 2 has type 'struct js_Object *' [-Wformat]
In file included from one.c:24:0:
regex.c: In function 'lex':
regex.c:279:13: warning: 'save' may be used uninitialized in this function [-Wuninitialized]
regex.c:248:7: note: 'save' was declared here
regex.c: In function 'compile':
regex.c:686:14: warning: 'inst' may be used uninitialized in this function [-Wuninitialized]
In file included from one.c:22:0:
jsstring.c: In function 'Sp_concat':
jsstring.c:103:15: warning: variable 'n' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
In file included from one.c:23:0:
jsvalue.c: In function 'js_instanceof':
jsrun.c:155:14: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
In file included from one.c:1:0:
jsarray.c: In function 'Ap_join':
jsarray.c:95:14: warning: variable 'sep' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
jsarray.c:97:15: warning: variable 'seplen' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
jsarray.c: In function 'Ap_sort':
jsrun.c:155:14: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
In file included from one.c:9:0:
jsfunction.c: In function 'jsB_Function':
jsfunction.c:11:14: warning: variable 'body' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]

@ghost
Copy link
Author

ghost commented Sep 30, 2014

CFLAGS := -std=gnu99 -D_GNU_SOURCE -DLINUX -Wall

regex.c: In function 'lexclass':
regex.c:248:14: warning: initialization makes integer from pointer without a cast [enabled by default]
regex.c: In function 'compile':
regex.c:686:14: warning: 'inst' may be used uninitialized in this function [-Wuninitialized]

@ccxvii
Copy link
Owner

ccxvii commented Oct 4, 2014

gcc is notoriously bad about tracking control flow when compiling with optimizations and setjmp/longjmp is involved. these warnings are harmless, and a better compiler like clang won't get confused by the same code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant