1 Answer
1

Both your example codes compile with no errors, and both of them produce the warning messages

LaTeX Font Warning: Font shape `OT1/cmss/m/n' in size <4> not available size <5>
substituted on input line 15.
LaTeX Font Warning: Size substitutions with differences up to 1.0pt have occurred.

As David has pointed out in his comment, those are not errors but just warning messages informing you that some font sizes (4pt, in this case) were not available in the current font used, so LaTeX used a different back-up size (5pt) instead.

The warnings come from the fact that beamer defines (the definitions are in beamerbasefont.sty) and uses some non-standard font sizes \Tiny and \TINY: