[Android] :
i got this error when i tried to compile cm

system/core/healthd/BatteryMonitor.cpp: In member function 'int android::BatteryMonitor::getBatteryStatus(const char*)':
system/core/healthd/BatteryMonitor.cpp:63:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:63:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:63:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:63:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:63:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp: In member function 'int android::BatteryMonitor::getBatteryHealth(const char*)':
system/core/healthd/BatteryMonitor.cpp:85:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:85:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:85:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:85:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:85:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:85:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:85:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp: In member function 'android::BatteryMonitor::PowerSupplyType android::BatteryMonitor::readPowerSupplyType(const android::String8&)':
system/core/healthd/BatteryMonitor.cpp:138:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:138:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:138:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:138:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:138:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:138:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:138:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:138:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:138:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:138:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp:138:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
system/core/healthd/BatteryMonitor.cpp: In member function 'bool android::BatteryMonitor::update()':
system/core/healthd/BatteryMonitor.cpp:179:11: error: 'struct android::BatteryProperties' has no member named 'dockBatterySupported'
system/core/healthd/BatteryMonitor.cpp:182:11: error: 'struct android::BatteryProperties' has no member named 'chargerDockAcOnline'
system/core/healthd/BatteryMonitor.cpp:191:11: error: 'struct android::BatteryProperties' has no member named 'dockBatteryStatus'
system/core/healthd/BatteryMonitor.cpp:192:11: error: 'struct android::BatteryProperties' has no member named 'dockBatteryHealth'
system/core/healthd/BatteryMonitor.cpp:193:11: error: 'struct android::BatteryProperties' has no member named 'dockBatteryCurrentNow'
system/core/healthd/BatteryMonitor.cpp:194:11: error: 'struct android::BatteryProperties' has no member named 'dockBatteryChargeCounter'
system/core/healthd/BatteryMonitor.cpp:228:19: error: 'struct android::BatteryProperties' has no member named 'dockBatteryPresent'
system/core/healthd/BatteryMonitor.cpp:230:19: error: 'struct android::BatteryProperties' has no member named 'dockBatteryPresent'
system/core/healthd/BatteryMonitor.cpp:232:15: error: 'struct android::BatteryProperties' has no member named 'dockBatteryLevel'
system/core/healthd/BatteryMonitor.cpp:233:15: error: 'struct android::BatteryProperties' has no member named 'dockBatteryVoltage'
system/core/healthd/BatteryMonitor.cpp:236:19: error: 'struct android::BatteryProperties' has no member named 'dockBatteryCurrentNow'
system/core/healthd/BatteryMonitor.cpp:239:19: error: 'struct android::BatteryProperties' has no member named 'dockBatteryChargeCounter'
system/core/healthd/BatteryMonitor.cpp:243:15: error: 'struct android::BatteryProperties' has no member named 'dockBatteryTemperature'
system/core/healthd/BatteryMonitor.cpp:246:19: error: 'struct android::BatteryProperties' has no member named 'dockBatteryStatus'
system/core/healthd/BatteryMonitor.cpp:249:19: error: 'struct android::BatteryProperties' has no member named 'dockBatteryHealth'
system/core/healthd/BatteryMonitor.cpp:252:19: error: 'struct android::BatteryProperties' has no member named 'dockBatteryTechnology'
system/core/healthd/BatteryMonitor.cpp:254:15: error: 'struct android::BatteryProperties' has no member named 'dockBatteryPresent'
system/core/healthd/BatteryMonitor.cpp:255:15: error: 'struct android::BatteryProperties' has no member named 'dockBatteryLevel'
system/core/healthd/BatteryMonitor.cpp:256:15: error: 'struct android::BatteryProperties' has no member named 'dockBatteryVoltage'
system/core/healthd/BatteryMonitor.cpp:257:15: error: 'struct android::BatteryProperties' has no member named 'dockBatteryTemperature'
system/core/healthd/BatteryMonitor.cpp:258:15: error: 'struct android::BatteryProperties' has no member named 'dockBatteryTechnology'
system/core/healthd/BatteryMonitor.cpp:284:27: error: 'struct android::BatteryProperties' has no member named 'chargerDockAcOnline'
system/core/healthd/BatteryMonitor.cpp:309:28: error: 'struct android::BatteryProperties' has no member named 'dockBatteryLevel'
system/core/healthd/BatteryMonitor.cpp:309:52: error: 'struct android::BatteryProperties' has no member named 'dockBatteryVoltage'
system/core/healthd/BatteryMonitor.cpp:310:28: error: 'struct android::BatteryProperties' has no member named 'dockBatteryTemperature'
system/core/healthd/BatteryMonitor.cpp:311:32: error: 'struct android::BatteryProperties' has no member named 'dockBatteryTemperature'
system/core/healthd/BatteryMonitor.cpp:312:32: error: 'struct android::BatteryProperties' has no member named 'dockBatteryTemperature'
system/core/healthd/BatteryMonitor.cpp:312:68: error: 'struct android::BatteryProperties' has no member named 'dockBatteryHealth'
system/core/healthd/BatteryMonitor.cpp:313:28: error: 'struct android::BatteryProperties' has no member named 'dockBatteryStatus'
system/core/healthd/BatteryMonitor.cpp:315:62: warning: zero-length gnu_printf format string [-Wformat-zero-length]
system/core/healthd/BatteryMonitor.cpp:328:51: error: 'struct android::BatteryProperties' has no member named 'dockBatteryCurrentNow'
system/core/healthd/BatteryMonitor.cpp:332:9: error: 'struct android::BatteryProperties' has no member named 'chargerDockAcOnline'
system/core/healthd/BatteryMonitor.cpp:342:42: error: 'struct android::BatteryProperties' has no member named 'chargerDockAcOnline'
system/core/healthd/BatteryMonitor.cpp:344:1: error: control reaches end of non-void function [-Werror=return-type]
cc1plus: some warnings being treated as errors
make: *** [/home/pedja/android_source/out/target/product/p760/obj/EXECUTABLES/healthd_intermediates/BatteryMonitor.o] Error 1

Can someone point me in the right direction

Thanks in advance

EDIT: I think i found the the problem

It might be not-enough-memory-related error as stated here:

http://xdaforums.com/showthread.php?t=2060017

EDIT2

That doesnt seem to be the problem, it fails with different error every time but always 'Error 1'