The advice given at the url the compiler gives is good advice, but how exactly does one "make your program shorter"? There are several ways, and I'll cover using "#if" defines to switch between debugging and production code, and an intro on how to trim down generic libraries.
Step 1: Conditional Compilation
An example can be found in one of the DHT22 sensor libraries to disable the code that returns float values. At line 35, 57, and 65 you can see "#if !defined(DHT22_NO_FLOAT)". By default DHT22_NO_FLOAT is not defined so the code is included. You can define it in your code, before including the library, to disable these functions if you do not need them and reduce the compiled size slightly like:
You can also use #defines in your code to switch out debugging and production code, such as:
//uncomment this for dev mode
//#define DEVMODE 1
// Setup the LCD
i2cbuffer = "";
i2cOutput = "";
In this case, I don't initialize the LCD, and later in the code I also don't use LCD drawing functions. This allows me to test the i2c methods while watching the serial port, but sacrifices the LCD display.