From 8800bc51daba77b424d179cd9d4d8a44b0f92dd7 Mon Sep 17 00:00:00 2001 From: Junfeng Dong Date: Thu, 31 Jan 2013 19:35:24 +0800 Subject: [PATCH] Fixed build on x86_64 and removed unused variable. Change-Id: I23d872d149b5af23efd15fbd645562f9d2e27749 --- CMakeLists.txt | 2 +- packaging/tel-plugin-indicator.spec | 7 ++----- src/desc-indicator.c | 5 ++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6869650..5596d27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,5 +36,5 @@ TARGET_LINK_LIBRARIES(indicator-plugin ${pkgs_LDFLAGS}) SET_TARGET_PROPERTIES(indicator-plugin PROPERTIES PREFIX "" OUTPUT_NAME indicator-plugin) # install -INSTALL(TARGETS indicator-plugin LIBRARY DESTINATION lib/telephony/plugins) +INSTALL(TARGETS indicator-plugin LIBRARY DESTINATION ${LIB_INSTALL_DIR}/telephony/plugins) INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME tel-plugin-indicator) diff --git a/packaging/tel-plugin-indicator.spec b/packaging/tel-plugin-indicator.spec index d023dc2..739e672 100644 --- a/packaging/tel-plugin-indicator.spec +++ b/packaging/tel-plugin-indicator.spec @@ -1,7 +1,6 @@ -#sbs-git:slp/pkgs/t/tel-plugin-indicator Name: tel-plugin-indicator Summary: Telephony Indicator plugin -Version: 0.1.7 +Version: 0.1.7 Release: 2 Group: System/Libraries License: Apache @@ -20,7 +19,7 @@ Telephony Indicator plugin %setup -q %build -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} +%cmake . make %{?jobs:-j%jobs} %post @@ -29,13 +28,11 @@ make %{?jobs:-j%jobs} %postun -p /sbin/ldconfig %install -rm -rf %{buildroot} %make_install mkdir -p %{buildroot}/usr/share/license %files %manifest tel-plugin-indicator.manifest %defattr(-,root,root,-) -#%doc COPYING %{_libdir}/telephony/plugins/indicator-plugin* /usr/share/license/tel-plugin-indicator diff --git a/src/desc-indicator.c b/src/desc-indicator.c index 4dfa790..f0533d6 100755 --- a/src/desc-indicator.c +++ b/src/desc-indicator.c @@ -187,7 +187,6 @@ static gboolean _indicator_get_pktcnt(gpointer user_data) FILE *pf = NULL; gint proc_ver = 0; gchar buff[INDICATOR_BUFF_SIZE]; - gchar *rv = NULL; pf = fopen(INDICATOR_PROCFILE, "r"); if (pf == NULL) { @@ -195,8 +194,8 @@ static gboolean _indicator_get_pktcnt(gpointer user_data) return FALSE; } - rv = fgets(buff, sizeof(buff), pf); - rv = fgets(buff, sizeof(buff), pf); + fgets(buff, sizeof(buff), pf); + fgets(buff, sizeof(buff), pf); proc_ver = _indicator_get_proc_ver(buff); while (fgets(buff, sizeof(buff), pf)) { -- 2.7.4