A senior Chinese military officer is visiting the Horn of Africa country Djibouti, where he inspected a Chinese warship participating in anti-piracy patrols, China's Defence Ministry said.