* [PATCH 1/2] stk: Fix sizeof on memcpy
@ 2013-05-22 23:01 Lucas De Marchi
2013-05-22 23:01 ` [PATCH 2/2] gitignore: Ignore file generated by Automake 1.13 Lucas De Marchi
2013-05-23 2:38 ` [PATCH 1/2] stk: Fix sizeof on memcpy Denis Kenzior
0 siblings, 2 replies; 4+ messages in thread
From: Lucas De Marchi @ 2013-05-22 23:01 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 924 bytes --]
src/stk.c: In function ‘__ofono_cbs_sim_download’:
src/stk.c:283:45: error: argument to ‘sizeof’ in ‘memcpy’ call is the
same expression as the source; did you mean to dereference it?
[-Werror=sizeof-pointer-memaccess]
memcpy(&e.cbs_pp_download.page, msg, sizeof(msg));
^
---
src/stk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/stk.c b/src/stk.c
index 7974751..01c95b5 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -280,7 +280,7 @@ void __ofono_cbs_sim_download(struct ofono_stk *stk, const struct cbs *msg)
e.type = STK_ENVELOPE_TYPE_CBS_PP_DOWNLOAD;
e.src = STK_DEVICE_IDENTITY_TYPE_NETWORK;
- memcpy(&e.cbs_pp_download.page, msg, sizeof(msg));
+ memcpy(&e.cbs_pp_download.page, msg, sizeof(*msg));
err = stk_send_envelope(stk, &e, stk_cbs_download_cb,
ENVELOPE_RETRIES_DEFAULT);
--
1.8.2.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] gitignore: Ignore file generated by Automake 1.13
2013-05-22 23:01 [PATCH 1/2] stk: Fix sizeof on memcpy Lucas De Marchi
@ 2013-05-22 23:01 ` Lucas De Marchi
2013-05-23 2:39 ` Denis Kenzior
2013-05-23 2:38 ` [PATCH 1/2] stk: Fix sizeof on memcpy Denis Kenzior
1 sibling, 1 reply; 4+ messages in thread
From: Lucas De Marchi @ 2013-05-22 23:01 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
Automake >= 1.13 enables parallel-tests option by default which uses a
test-driver script (copied by automake). Ignore this file and the files
generated by this script.
---
.gitignore | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.gitignore b/.gitignore
index 91668c7..b9c23a0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,8 @@ ltmain.sh
missing
stamp-h1
autom4te.cache
+test-driver
+test-suite.log
ofono.pc
include/ofono
@@ -42,6 +44,8 @@ unit/test-mux
unit/test-caif
unit/test-stkutil
unit/test-cdmasms
+unit/test-*.log
+unit/test-*.trs
tools/huawei-audio
tools/auto-enable
--
1.8.2.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] stk: Fix sizeof on memcpy
2013-05-22 23:01 [PATCH 1/2] stk: Fix sizeof on memcpy Lucas De Marchi
2013-05-22 23:01 ` [PATCH 2/2] gitignore: Ignore file generated by Automake 1.13 Lucas De Marchi
@ 2013-05-23 2:38 ` Denis Kenzior
1 sibling, 0 replies; 4+ messages in thread
From: Denis Kenzior @ 2013-05-23 2:38 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 554 bytes --]
Hi Lucas,
On 05/22/2013 06:01 PM, Lucas De Marchi wrote:
> src/stk.c: In function ‘__ofono_cbs_sim_download’:
> src/stk.c:283:45: error: argument to ‘sizeof’ in ‘memcpy’ call is the
> same expression as the source; did you mean to dereference it?
> [-Werror=sizeof-pointer-memaccess]
> memcpy(&e.cbs_pp_download.page, msg, sizeof(msg));
> ^
> ---
> src/stk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Patch has been applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-23 2:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-22 23:01 [PATCH 1/2] stk: Fix sizeof on memcpy Lucas De Marchi
2013-05-22 23:01 ` [PATCH 2/2] gitignore: Ignore file generated by Automake 1.13 Lucas De Marchi
2013-05-23 2:39 ` Denis Kenzior
2013-05-23 2:38 ` [PATCH 1/2] stk: Fix sizeof on memcpy Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.