Skip to content

Commit 5f3bffc

Browse files
committed
NH-802 - Fix build warnings
1 parent b1cbdc4 commit 5f3bffc

File tree

13 files changed

+19
-24
lines changed

13 files changed

+19
-24
lines changed

src/NHibernate/Bytecode/Lightweight/ReflectionOptimizer.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ protected virtual void ThrowExceptionForNoDefaultCtor(System.Type type)
100100
protected DynamicMethod CreateDynamicMethod(System.Type returnType, System.Type[] argumentTypes)
101101
{
102102
System.Type owner = mappedType.IsInterface ? typeof (object) : mappedType;
103+
#pragma warning disable 618
103104
bool canSkipChecks = SecurityManager.IsGranted(new ReflectionPermission(ReflectionPermissionFlag.MemberAccess));
105+
#pragma warning restore 618
104106
return new DynamicMethod(string.Empty, returnType, argumentTypes, owner, canSkipChecks);
105107
}
106108

@@ -244,4 +246,4 @@ private SetPropertyValuesInvoker GenerateSetPropertyValuesMethod(IGetter[] gette
244246
return (SetPropertyValuesInvoker) method.CreateDelegate(typeof (SetPropertyValuesInvoker));
245247
}
246248
}
247-
}
249+
}

src/NHibernate/Dialect/BitwiseNativeOperation.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace NHibernate.Dialect
1010
/// <summary>
1111
/// Treats bitwise operations as native operations.
1212
/// </summary>
13-
/// </remarks>
1413
[Serializable]
1514
public class BitwiseNativeOperation : ISQLFunction
1615
{

src/NHibernate/Hql/Ast/ANTLR/Generated/SqlGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace NHibernate.Hql.Ast.ANTLR
3434
/**
3535
* SQL Generator Tree Parser, providing SQL rendering of SQL ASTs produced by the previous phase, HqlSqlWalker. All
3636
* syntax decoration such as extra spaces, lack of spaces, extra parens, etc. should be added by this class.
37-
* <br>
37+
* <br/>
3838
* This grammar processes the HQL/SQL AST and produces an SQL string. The intent is to move dialect-specific
3939
* code into a sub-class that will override some of the methods, just like the other two grammars in this system.
4040
* @author Joshua Davis ([email protected])

src/NHibernate/Hql/Ast/ANTLR/HqlToken.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,6 @@ public bool PossibleId
4444
get { return HqlParser.possibleIds[Type]; }
4545
}
4646

47-
/// <summary>
48-
/// Gets or Sets the type of the token, remembering the previous type on Sets.
49-
/// </summary>
50-
//public override int Type
51-
//{
52-
// get
53-
// {
54-
// return base.Type;
55-
// }
56-
// set
57-
// {
58-
// _previousTokenType = Type;
59-
// base.Type = value;
60-
// }
61-
//}
62-
6347
/// <summary>
6448
/// Returns the previous token type.
6549
/// </summary>
@@ -81,4 +65,4 @@ public override string ToString()
8165
+ CharPositionInLine + ",possibleID=" + PossibleId + "]";
8266
}
8367
}
84-
}
68+
}

src/NHibernate/Hql/Ast/ANTLR/SqlGenerator.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* SQL Generator Tree Parser, providing SQL rendering of SQL ASTs produced by the previous phase, HqlSqlWalker. All
33
* syntax decoration such as extra spaces, lack of spaces, extra parens, etc. should be added by this class.
4-
* <br>
4+
* <br/>
55
* This grammar processes the HQL/SQL AST and produces an SQL string. The intent is to move dialect-specific
66
* code into a sub-class that will override some of the methods, just like the other two grammars in this system.
77
* @author Joshua Davis ([email protected])

src/NHibernate/Hql/Ast/ANTLR/Tree/ComponentJoin.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace NHibernate.Hql.Ast.ANTLR.Tree
99
{
10+
[CLSCompliant(false)]
1011
public class ComponentJoin : FromElement
1112
{
1213
private readonly string columns;
@@ -172,4 +173,4 @@ private string GetPropertyPath(string propertyName)
172173

173174
#endregion
174175
}
175-
}
176+
}

src/NHibernate/Hql/Ast/ANTLR/Tree/DotNode.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ public class DotNode : FromReferenceNode
4141
/// <summary>
4242
/// The type of dereference that happened (DEREF_xxx).
4343
/// </summary>
44+
#pragma warning disable 414
4445
private int _dereferenceType = DerefUnknown;
46+
#pragma warning restore 414
4547

4648
/// <summary>
4749
/// The identifier that is the name of the property.

src/NHibernate/Hql/Ast/ANTLR/Tree/FromClause.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ public class FromClause : HqlSqlWalkerNode, IDisplayableNode
2323
/// <summary>
2424
/// Counts the from elements as they are added.
2525
/// </summary>
26+
#pragma warning disable 649
2627
private int _fromElementCounter;
28+
#pragma warning restore 649
2729

2830
private readonly NullableDictionary<string, FromElement> _fromElementByClassAlias = new NullableDictionary<string, FromElement>();
2931
private readonly Dictionary<string, FromElement> _fromElementByTableAlias = new Dictionary<string, FromElement>();

src/NHibernate/Hql/Ast/ANTLR/Tree/ResultVariableRefNode.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ namespace NHibernate.Hql.Ast.ANTLR.Tree
1616
/// "value" used in the order by clause is a reference to the result_variable, "value", defined in the select clause.
1717
/// </example>
1818
/// Author: Gail Badner
19+
[CLSCompliant(false)]
1920
public class ResultVariableRefNode : HqlSqlWalkerNode
2021
{
2122
private ISelectExpression _selectExpression;

src/NHibernate/Id/Enhanced/TableGenerator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,11 @@ public virtual void Configure(IType type, IDictionary<string, string> parms, Dia
239239

240240
#endregion
241241

242-
243242
/// <summary>
244243
/// Determine the table name to use for the generator values. Called during configuration.
245244
/// </summary>
246245
/// <param name="parms">The parameters supplied in the generator config (plus some standard useful extras).</param>
246+
/// <param name="dialect">The dialect</param>
247247
protected string DetermineGeneratorTableName(IDictionary<string, string> parms, Dialect.Dialect dialect)
248248
{
249249
string name = PropertiesHelper.GetString(TableParam, parms, DefaultTable);
@@ -277,6 +277,7 @@ protected string DetermineGeneratorTableName(IDictionary<string, string> parms,
277277
/// Called during configuration.
278278
/// </summary>
279279
/// <param name="parms">The parameters supplied in the generator config (plus some standard useful extras).</param>
280+
/// <param name="dialect">The <see cref="Dialect.Dialect"/></param>
280281
protected string DetermineSegmentColumnName(IDictionary<string, string> parms, Dialect.Dialect dialect)
281282
{
282283
// NHibernate doesn't seem to have anything resembling this ObjectNameNormalizer. Ignore that for now.

src/NHibernate/Impl/ExpressionProcessor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,15 @@ static ExpressionProcessor()
174174
RegisterCustomProjection(() => default(DateTimeOffset).Second, e => ProjectionsExtensions.ProcessSecond(e.Expression));
175175
RegisterCustomProjection(() => default(DateTimeOffset).Date, e => ProjectionsExtensions.ProcessDate(e.Expression));
176176

177+
#pragma warning disable 618
177178
RegisterCustomProjection(() => ProjectionsExtensions.YearPart(default(DateTime)), e => ProjectionsExtensions.ProcessYear(e.Arguments[0]));
178179
RegisterCustomProjection(() => ProjectionsExtensions.DayPart(default(DateTime)), e => ProjectionsExtensions.ProcessDay(e.Arguments[0]));
179180
RegisterCustomProjection(() => ProjectionsExtensions.MonthPart(default(DateTime)), e => ProjectionsExtensions.ProcessMonth(e.Arguments[0]));
180181
RegisterCustomProjection(() => ProjectionsExtensions.HourPart(default(DateTime)), e => ProjectionsExtensions.ProcessHour(e.Arguments[0]));
181182
RegisterCustomProjection(() => ProjectionsExtensions.MinutePart(default(DateTime)), e => ProjectionsExtensions.ProcessMinute(e.Arguments[0]));
182183
RegisterCustomProjection(() => ProjectionsExtensions.SecondPart(default(DateTime)), e => ProjectionsExtensions.ProcessSecond(e.Arguments[0]));
183184
RegisterCustomProjection(() => ProjectionsExtensions.DatePart(default(DateTime)), e => ProjectionsExtensions.ProcessDate(e.Arguments[0]));
185+
#pragma warning restore 618
184186

185187
RegisterCustomProjection(() => ProjectionsExtensions.Sqrt(default(int)), ProjectionsExtensions.ProcessSqrt);
186188
RegisterCustomProjection(() => ProjectionsExtensions.Sqrt(default(double)), ProjectionsExtensions.ProcessSqrt);

src/NHibernate/Impl/SessionImpl.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ void IDeserializationCallback.OnDeserialization(object sender)
205205
/// <param name="autoCloseSessionEnabled">Should we auto close after completion of transaction</param>
206206
/// <param name="ignoreExceptionBeforeTransactionCompletion">Should we ignore exceptions in IInterceptor.BeforeTransactionCompletion</param>
207207
/// <param name="connectionReleaseMode">The mode by which we should release JDBC connections.</param>
208+
/// <param name="defaultFlushMode">The default flush mode for this session</param>
208209
internal SessionImpl(
209210
IDbConnection connection,
210211
SessionFactoryImpl factory,

src/NHibernate/Linq/Visitors/WhereJoinDetector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace NHibernate.Linq.Visitors
3131
/// For example:
3232
/// a.B.C == 1 could never produce true if B didn't match any rows, so it's safe to inner join.
3333
/// a.B.C == null could produce true even if B didn't match any rows, so we can't inner join.
34-
/// a.B.C == 1 && a.D.E == 1 can be inner joined.
34+
/// a.B.C == 1 &amp;&amp; a.D.E == 1 can be inner joined.
3535
/// a.B.C == 1 || a.D.E == 1 must be outer joined.
3636
///
3737
/// By default we outer join via the code in VisitExpression. The use of inner joins is only

0 commit comments

Comments
 (0)