Fix gcc invalid prototype warnings