summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorlokilee73 <changjoo.lee@samsung.com>2017-09-08 16:03:04 +0900
committerINSUN PYO <insun.pyo@samsung.com>2017-09-11 22:33:11 +0000
commit99a3d6b038c474793dc39500b0f8f94fb17944aa (patch)
tree4e162a9413c187a1a55772e90a389a7c72f80f44 /hw
parent013a1f2eba43a041052e1f6f1b8af97652412381 (diff)
downloaddevice-tm1-99a3d6b038c474793dc39500b0f8f94fb17944aa.tar.gz
device-tm1-99a3d6b038c474793dc39500b0f8f94fb17944aa.tar.bz2
device-tm1-99a3d6b038c474793dc39500b0f8f94fb17944aa.zip
remove build warning
Touchscreen_init calls the open function of hal at the begining of the boot with the call stack below. So, the open function of hal is never called at the same time in multi-thread. Therefore, we can use safely readdir in deviced. 0 touchscreen_init 1 0x2a00b02c in devices_init (data=0x0) at /usr/src/debug/deviced-2.0.0/src/core/devices.c:102 2 0x2a00e424 in deviced_main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/deviced-2.0.0/src/core/main.c:93 3 0x2a0078f4 in main (argc=1, argv=0xbefffe64) at /usr/src/debug/deviced-2.0.0/src/core/main.c:123 Change-Id: Iee6fcde249df15a73723d7ae1ffce7c68c93b9ad Signed-off-by: lokilee73 <changjoo.lee@samsung.com> (cherry picked from commit 042bfd00d4596e55e59ff8d7d1ab1896b07ee91a)
Diffstat (limited to 'hw')
-rw-r--r--hw/touchscreen/touchscreen.c3
-rwxr-xr-x[-rw-r--r--]hw/usb_client/usb_client.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/hw/touchscreen/touchscreen.c b/hw/touchscreen/touchscreen.c
index 39ad64f..b9e2e12 100644
--- a/hw/touchscreen/touchscreen.c
+++ b/hw/touchscreen/touchscreen.c
@@ -40,7 +40,6 @@ static char *touchscreen_node;
static int touchscreen_probe(void)
{
DIR *d;
- struct dirent entry;
struct dirent *dir;
char buf[PATH_MAX];
int val, ret = -ENOTSUP;
@@ -49,7 +48,7 @@ static int touchscreen_probe(void)
if (!d)
return -ENOTSUP;
- while (readdir_r(d, &entry, &dir) == 0 && dir != NULL) {
+ while ((dir = readdir(d))) {
if (dir->d_name[0] == '.')
continue;
snprintf(buf, sizeof(buf), "%s%s%s", INPUT_PATH,
diff --git a/hw/usb_client/usb_client.c b/hw/usb_client/usb_client.c
index 455e741..232381b 100644..100755
--- a/hw/usb_client/usb_client.c
+++ b/hw/usb_client/usb_client.c
@@ -565,7 +565,7 @@ static void legacy_free_gadget(struct usb_gadget *gadget)
if (!gadget)
return;
- if (gadget->strs) {
+ if (gadget->strs) {
for (i = 0; gadget->strs[i].lang_code; ++i) {
free(gadget->strs[i].manufacturer);
free(gadget->strs[i].product);