Examples of errors detected by the V3066 diagnostic


V3066. Possible incorrect order of arguments passed to method.


FlashDevelop

V3066 Possible incorrect order of arguments passed to '_channelMixer_OVERLAY' method: 'back' and 'fore'. BBCodeStyle.cs 302


static float _channelMixer_OVERLAY(float back, float fore)
{
  ....
}

private static float _channelMixer_HARDLIGHT(float back,
  float fore)
{
  return _channelMixer_OVERLAY(fore, back);
}

Media Portal 2

V3066 Possible incorrect order of arguments passed to 'TryCreateMultimediaCDDriveHandler' method. RemovableMediaManager.cs 109


public static MultimediaDriveHandler
TryCreateMultimediaCDDriveHandler(DriveInfo driveInfo,
  IEnumerable<Guid> videoMIATypeIds,
  IEnumerable<Guid> imageMIATypeIds, // <=
  IEnumerable<Guid> audioMIATypeIds) // <=
  { .... }

protected void ExamineVolume(string drive)
{
  ....
  MultimediaDriveHandler.TryCreateMultimediaCDDriveHandler(
    driveInfo,
    Consts.NECESSARY_VIDEO_MIAS,
    Consts.NECESSARY_AUDIO_MIAS, // <=
    Consts.NECESSARY_IMAGE_MIAS) // <=
  ....
}

'NECESSARY_AUDIO_MIAS' and 'NECESSARY_IMAGE_MIAS' has incorrect order passed to 'TryCreateMultimediaCDDriveHandler' method.


.NET Core Libraries (CoreFX)

V3066 Possible incorrect order of arguments passed to 'SerializationHeaderRecord' constructor: 'minorVersion' and 'majorVersion'. BinaryFormatterWriter.cs 111


internal void WriteSerializationHeader(
  int topId,
  int headerId,
  int minorVersion,
  int majorVersion)
{
  var record = new SerializationHeaderRecord(
                     BinaryHeaderEnum.SerializedStreamHeader,
                     topId,
                     headerId,
                     minorVersion,  // <=
                     majorVersion); // <=
  record.Write(this);
}

internal SerializationHeaderRecord(
  BinaryHeaderEnum binaryHeaderEnum,
  int topId,
  int headerId,
  int majorVersion, // <=
  int minorVersion) // <=
{
  _binaryHeaderEnum = binaryHeaderEnum;
  _topId = topId;
  _headerId = headerId;
  _majorVersion = majorVersion;
  _minorVersion = minorVersion;
}


Bugs Found

Checked Projects
355
Collected Errors
13 303