BME280.cpp error on ESP32

I connected a BME280 sensor to an ESP32WROOM board. Compiling and uploading works fine from my PC (win7) with Arduino 1.8.5
When I compile the sketch on my laptop (HP, win7, Arduino 1.8.5) I get the error :
"Error compiling for board ESP32 Dev Module."
Scrolling up I find :
C:\Users\Paul VdB\Documents\Arduino\libraries\BME280\src\BME280.cpp: In member function 'bool BME280::WriteSettings()':
C:\Users\Paul VdB\Documents\Arduino\libraries\BME280\src\BME280.cpp:98:1: error: no return statement in function returning non-void [-Werror=return-type]
I check the BME280.cpp files : BOTH are exactly the same the same :

88 /****************************************************************/
89 bool BME280::WriteSettings()
90 {
91  uint8_t ctrlHum, ctrlMeas, config;
92
93   CalculateRegisters(ctrlHum, ctrlMeas, config);
94
95   WriteRegister(CTRL_HUM_ADDR, ctrlHum);
96   WriteRegister(CTRL_MEAS_ADDR, ctrlMeas);
97   WriteRegister(CONFIG_ADDR, config);
98 }

Why is there no problem on the PC, but error on the laptop ?
I compiled other sketches on the laptop without any problems as long as I don't use the BME library ...
Someone has a clue ?

Extremely lots of thanks in advance :slight_smile:

Is the one sensor library version the same as the other sensor library?

Thanks for your reply, Idahowalker, but as I stated before : Everything on the laptop is copied from the PC. (except the arduino.exe of course but both are 1.8.5)
The piece of code that I posted is a part of
. the bme280.cpp file, the part where the compiler complains about. And of course it is the same on both computers because one is a COPY of the other. When I leave out the BME library, everything compiles/runs just fine. When I include the library on the laptop, I get the above error. On the PC everything runs/compiles fine with or without the BME library..
So, I'm (still) wondering what the difference might be between the laptop and the PC ...

Maybe you have different compiler preferences set in the IDE on each computer (not sure how that is possible if everything is COPIED...) If you google bme280 writesettings you will see the you are not the only one the has gotten that error message. You could implement one of several fixes that have been proposed, the simplest (with blinders on) is merely adding a return true statement. Or find another library...

Hey Dave !!!

Thanks for your suggestion.

IT WORKS !!!
Adding he "return true" statement DID IT !!!

still the (for now "retorical" :wink: ) question : Why does the (same) compiler does it without that return statement on my PC... ???

Nevertheless : 1K thanks !!! (I owe you one !) :slight_smile: