An earthquake in Indonesia has triggered a tsunami warning and caused damage to homes off Flores.