mirror of https://github.com/svaarala/duktape.git
Sami Vaarala
11 years ago
2 changed files with 69 additions and 0 deletions
@ -0,0 +1,37 @@ |
|||
--- !ditz.rubyforge.org,2008-03-06/issue |
|||
title: type-pun warning in duk_api.c:275 and a few other places |
|||
desc: "" |
|||
type: :bugfix |
|||
component: duk |
|||
release: v0.6 |
|||
reporter: sva <sami.vaarala@iki.fi> |
|||
status: :unstarted |
|||
disposition: |
|||
creation_time: 2013-09-19 05:52:37.754098 Z |
|||
references: [] |
|||
|
|||
id: bc7225eb1bba18c83f0ba8d973caeb3341709a1b |
|||
log_events: |
|||
- - 2013-09-19 05:52:38.447108 Z |
|||
- sva <sami.vaarala@iki.fi> |
|||
- created |
|||
- "" |
|||
- - 2013-09-19 05:53:53.123184 Z |
|||
- sva <sami.vaarala@iki.fi> |
|||
- commented |
|||
- "Happens in multiple places:\n\n\ |
|||
duk_api.c: In function \xE2\x80\x98resize_valstack\xE2\x80\x99:\n\ |
|||
duk_api.c:275: warning: dereferencing type-punned pointer will break\n\ |
|||
strict-aliasing rules\n\ |
|||
duk_hthread_stacks.c: In function \xE2\x80\x98duk_hthread_callstack_grow\xE2\x80\x99:\n\ |
|||
duk_hthread_stacks.c:53: warning: dereferencing type-punned pointer\n\ |
|||
will break strict-aliasing rules\n\ |
|||
duk_hthread_stacks.c: In function \xE2\x80\x98duk_hthread_callstack_shrink_check\xE2\x80\x99:\n\ |
|||
duk_hthread_stacks.c:82: warning: dereferencing type-punned pointer\n\ |
|||
will break strict-aliasing rules\n\ |
|||
duk_hthread_stacks.c: In function \xE2\x80\x98duk_hthread_catchstack_grow\xE2\x80\x99:\n\ |
|||
duk_hthread_stacks.c:272: warning: dereferencing type-punned pointer\n\ |
|||
will break strict-aliasing rules\n\ |
|||
duk_hthread_stacks.c: In function \xE2\x80\x98duk_hthread_catchstack_shrink_check\xE2\x80\x99:\n\ |
|||
duk_hthread_stacks.c:301: warning: dereferencing type-punned pointer\n\ |
|||
will break strict-aliasing rules" |
@ -0,0 +1,32 @@ |
|||
--- !ditz.rubyforge.org,2008-03-06/issue |
|||
title: cleanup snprintf() convention |
|||
desc: |- |
|||
There seem to be to variants of snprintf (and its friends): some ensure a |
|||
NUL terminator is added when truncated and others do not. |
|||
|
|||
The most portable way seems to be to:: |
|||
|
|||
char buf[256]; |
|||
|
|||
snprintf(buf, sizeof(buf), "format", args); |
|||
buf[sizeof(buf) - 1] = (char) 0; |
|||
|
|||
Using sizeof(buf) - 1 for size may cause a NUL terminator to appear at |
|||
the second to last character of buf in some cases. |
|||
|
|||
Document in code-issues.txt. |
|||
type: :task |
|||
component: duk |
|||
release: v0.8 |
|||
reporter: sva <sami.vaarala@iki.fi> |
|||
status: :unstarted |
|||
disposition: |
|||
creation_time: 2013-09-19 07:09:07.951148 Z |
|||
references: [] |
|||
|
|||
id: ee19ffa04904f297e2ac4957a4cd442c9a0e0c2b |
|||
log_events: |
|||
- - 2013-09-19 07:09:08.132219 Z |
|||
- sva <sami.vaarala@iki.fi> |
|||
- created |
|||
- "" |
Loading…
Reference in new issue