From: Shane Bryan <shane.bryan@linux.intel.com>
To: ofono@ofono.org
Subject: Re: Compile error
Date: Tue, 04 Aug 2009 09:22:31 -0700 [thread overview]
Message-ID: <20090804092231.4e8c8677@cyclone> (raw)
In-Reply-To: <4A77C635.7020606@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 526 bytes --]
On Tue, 04 Aug 2009 08:25:09 +0300
Marko Saukko <marko.saukko@gmail.com> wrote:
> Hi,
>
> I'm getting following error when compiling the latest git version with
> gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3.
Attached is a patch to fix the errors.
WARNING: It still does nothing with the return values, but it resolves
the compiler errors, *that's it*.
Someone who knows something about what should happen if the write fails
really ought to review and adjust this as appropriate. I am not that
person.
Shane...
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-fix-ignored-return-size-when-calling-write.patch --]
[-- Type: text/x-patch, Size: 1677 bytes --]
>From 2adb1f998dc62b9987a0b8982d0e288969710891 Mon Sep 17 00:00:00 2001
From: Shane Bryan <shane.bryan@linux.intel.com>
Date: Tue, 4 Aug 2009 09:13:31 -0700
Subject: [PATCH] fix ignored return size when calling write ()
sim.c uses write () but ignores the size returned. This causes
compile failures with default options generated with bootstrap
Signed-off-by: Shane Bryan <shane.bryan@linux.intel.com>
---
src/sim.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/sim.c b/src/sim.c
index 6e144f4..1c0666e 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -312,6 +312,7 @@ static void sim_op_retrieve_cb(const struct ofono_error *error,
char *imsi = sim->imsi;
char *path;
int fd;
+ ssize_t w_size;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
sim_op_error(modem);
@@ -333,7 +334,7 @@ static void sim_op_retrieve_cb(const struct ofono_error *error,
if (lseek(fd, (op->current - 1) * op->record_length +
SIM_CACHE_HEADER_SIZE, SEEK_SET) !=
(off_t) -1)
- write(fd, data, op->record_length);
+ w_size = write(fd, data, op->record_length);
close(fd);
}
@@ -409,6 +410,7 @@ static void sim_op_info_cb(const struct ofono_error *error, int length,
enum sim_file_access update;
enum sim_file_access invalidate;
enum sim_file_access rehabilitate;
+ ssize_t w_size;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
sim_op_error(modem);
@@ -459,7 +461,7 @@ static void sim_op_info_cb(const struct ofono_error *error, int length,
fileinfo[4] = record_length >> 8;
fileinfo[5] = record_length & 0xff;
- write(fd, fileinfo, 6);
+ w_size = write(fd, fileinfo, 6);
close(fd);
}
}
--
1.6.0.4
next prev parent reply other threads:[~2009-08-04 16:22 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-04 5:25 Compile error Marko Saukko
2009-08-04 16:22 ` Shane Bryan [this message]
2009-08-04 20:20 ` Denis Kenzior
2009-08-04 20:57 ` Shane Bryan
-- strict thread matches above, loose matches on Subject: below --
2025-08-05 2:39 compile error 刘杨
2025-08-05 10:56 ` Jan Kiszka
2023-06-05 5:30 Chan Kim
2023-06-12 21:17 ` Simon Glass
2023-06-04 14:41 Chan Kim
2023-06-12 21:17 ` Simon Glass
2017-10-24 2:17 liupan1234
2013-06-18 13:14 Fikret Alim
2013-06-18 14:12 ` Gary Thomas
2013-06-18 14:17 ` Luo Zhenhua-B19537
2009-12-18 2:00 Compile Error 陈洁丹
2009-12-18 14:35 ` Steve Grubb
2009-12-17 6:22 陈洁丹
2009-12-17 11:42 ` Steve Grubb
2009-03-18 1:17 compile error Dennis Kavadas
2009-03-18 1:24 ` Julian Calaby
2009-03-18 1:29 ` Dennis Kavadas
2009-03-18 1:32 ` Julian Calaby
2009-03-18 1:34 ` Dennis Kavadas
2008-02-18 2:38 Zhao, Yunfeng
2008-02-18 10:16 ` Avi Kivity
2008-02-18 13:15 ` Zhao, Yunfeng
2008-02-18 14:51 ` Avi Kivity
2008-01-09 2:37 Zhao, Yunfeng
[not found] ` <10EA09EFD8728347A513008B6B0DA77A029F4E20-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2008-01-09 8:39 ` Avi Kivity
[not found] ` <4784882F.9000103-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-09 17:03 ` Hollis Blanchard
2008-01-10 9:56 ` Avi Kivity
2007-09-10 3:03 VictorLai
2007-07-09 1:13 Compile error Zhao, Yunfeng
[not found] ` <10EA09EFD8728347A513008B6B0DA77A01B8F5C9-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-07-09 7:02 ` Avi Kivity
2007-06-28 3:26 debug and breakpoint interrupts handling? Jun Koi
[not found] ` <fdaac4d50706272026r33a09fe5gf96d1e2827e3fa30-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-29 6:12 ` Compile error Dong, Eddie
[not found] ` <10EA09EFD8728347A513008B6B0DA77A01AE9AD9-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-07-01 9:35 ` Dor Laor
2007-06-01 5:22 compile error Zhao, Yunfeng
[not found] ` <10EA09EFD8728347A513008B6B0DA77A01888A23-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-06-01 6:29 ` Avi Kivity
2006-09-05 18:20 Compile Error wei.li4
2005-10-12 11:28 compile error Stephan Böni
2005-08-27 11:29 James Harper
2005-08-27 11:51 ` Keir Fraser
2005-08-27 10:44 James Harper
2005-04-14 10:47 Jiang Jun-A21079
2004-07-24 15:55 Compile error Don Hughes
2004-07-25 15:27 ` Mark E. Donaldson
2004-03-18 12:29 compile error Mauro Stettler
2004-03-02 9:42 liu zixing
2004-03-02 9:52 ` David Woodhouse
2002-11-09 0:24 Compile error Indy500
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090804092231.4e8c8677@cyclone \
--to=shane.bryan@linux.intel.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.