Aaah, Ext.Viewport.add expects an array of components. The following doesn't generate the warning:

var mainView = Ext.widget('mainLayout');
Ext.Viewport.add([mainView]);