  Cosmic voids are promising tools for cosmological tests due to their
sensitivity to dark energy, modified gravity and alternative cosmological
scenarios. Most previous studies in the literature of void properties use
cosmological N-body simulations of dark matter (DM) particles that ignore the
potential effect of baryonic physics. Using a spherical underdensity finder, we
analyse voids using the mass field and subhalo tracers in the EAGLE
simulations, which follow the evolution of galaxies in a $\rm{\Lambda}$ cold
dark matter Universe with state-of-the-art subgrid models for baryonic
processes in a $(100 \rm{cMpc})^3$ volume. We study the effect of baryons on
void statistics by comparing results with DM-only simulations that use the same
initial conditions as EAGLE. When identifying voids in the mass field, we find
that a DM-only simulation produces 24 per cent more voids than a hydrodynamical
one due to the action of galaxy feedback polluting void regions with hot gas,
specially for small voids with $r_{\rm{void}} \le 10\ \rm{Mpc}$. We find that
the way in which galaxy tracers are selected has a strong impact on the
inferred void properties. Voids identified using galaxies selected by their
stellar mass are larger and have cuspier density profiles than those identified
by galaxies selected by their total mass. Overall, baryons have minimal effects
on void statistics, as void properties are well captured by DM-only
simulations, but it is important to account for how galaxies populate DM haloes
to estimate the observational effect of different cosmological models on the
statistics of voids.
