[PATCH phosphor-host-ipmid 0/3] Unused code
OpenBMC Patches
openbmc-patches at stwcx.xyz
Tue Mar 15 14:20:29 AEDT 2016
Wasn't able to compile this to test:
```
$ make
g++ -std=c++14 -fpic -c ipmid.C -Wall -Wno-unused-result -lsystemd -I. -O2 -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" -o ipmid.o
g++ ipmid.o -lsystemd -rdynamic -o ipmid -ldl
g++ -std=c++14 -fpic -c apphandler.C -Wall -Wno-unused-result -lsystemd -I. -O2 -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" -o apphandler.o
g++ -std=c++14 -fpic -c sensorhandler.C -Wall -Wno-unused-result -lsystemd -I. -O2 -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" -o sensorhandler.o
g++ -std=c++14 -fpic -c storagehandler.C -Wall -Wno-unused-result -lsystemd -I. -O2 -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" -o storagehandler.o
g++ -std=c++14 -fpic -c chassishandler.C -Wall -Wno-unused-result -lsystemd -I. -O2 -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" -o chassishandler.o
g++ -std=c++14 -fpic -c dcmihandler.C -Wall -Wno-unused-result -lsystemd -I. -O2 -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" -o dcmihandler.o
g++ -std=c++14 -fpic -c ipmisensor.C -Wall -Wno-unused-result -lsystemd -I. -O2 -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" -o ipmisensor.o
g++ -std=c++14 -fpic -c storageaddsel.C -Wall -Wno-unused-result -lsystemd -I. -O2 -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" -o storageaddsel.o
g++ -std=c++14 -fpic -c transporthandler.C -Wall -Wno-unused-result -lsystemd -I. -O2 -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" -o transporthandler.o
g++ -std=c++14 -fpic -c globalhandler.C -Wall -Wno-unused-result -lsystemd -I. -O2 -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" -o globalhandler.o
g++ -std=c++14 -fpic -c groupext.C -Wall -Wno-unused-result -lsystemd -I. -O2 -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" -o groupext.o
g++ apphandler.o sensorhandler.o storagehandler.o chassishandler.o dcmihandler.o ipmisensor.o storageaddsel.o transporthandler.o globalhandler.o groupext.o -shared -lsystemd -rdynamic -o libapphandler.so
cc -Wall -Wno-unused-result -c -o host-services.o host-services.c
g++ host-services.o -shared -lsystemd -rdynamic -o libhostservice.so
/usr/bin/ld: host-services.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
host-services.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:56: recipe for target 'libhostservice.so' failed
make: *** [libhostservice.so] Error 1
$ g++ --version
g++ (GCC) 5.3.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
Did make all the .o's so hopefully it is ok.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/openbmc/phosphor-host-ipmid/79)
<!-- Reviewable:end -->
https://github.com/openbmc/phosphor-host-ipmid/pull/79
Cyril Bur (3):
Remove unused code
Remove unused dbus call
Remove unused variable warnings
apphandler.C | 30 ++++++------------------------
globalhandler.C | 8 ++------
ipmid.C | 42 +++++++++++++-----------------------------
transporthandler.C | 18 ++++++------------
4 files changed, 27 insertions(+), 71 deletions(-)
--
2.7.1
More information about the openbmc
mailing list