// GetWarnings gets warnings.
188938
func (sc *StatementContext) GetWarnings() []error {
	sc.mu.Lock()
	warns := make([]error, len(sc.mu.warnings))
	copy(warns, sc.mu.warnings)
	sc.mu.Unlock()
	return warns
}
969771
func Warn(msg string, ctx ...interface{}) {
	metrics.GetOrRegisterCounter("warn", nil).Inc(1)
	l.Output(msg, l.LvlWarn, CallDepth, ctx...)
}
123310
func (api *Client) GetMessages(query ...*GetMessagesQuery) ([]*Message, error) {
	var options *GetMessagesQuery
	if len(query) > 0 {
		options = query[0]
	}
	result, _, err := api.makeRequest(http.MethodGet, api.concatUserPath(messagesPath), &[]*Message{}, options)
	if err != nil {
		return nil, err
	}
	return *(result.(*[]*Message)), nil
}
93213
func (e *extractorImpl) GetConstraints(applications ...string) ([]constraints.Value, error) {
	return e.application.GetConstraints(applications...)
}
366830
func ImportWarnings(v []string) Warnings {
	w := make([]Warning, len(v))
	for i, s := range v {
		w[i] = StringWarning(s)
	}
	return Warnings{w: w}
}
1212618
func (s *UpdateConfigurationResponse) SetWarnings(v []*SanitizationWarning) *UpdateConfigurationResponse {
	s.Warnings = v
	return s
}
274789
func (v *Function) GetExceptions() (o []*Argument) {
	if v != nil && v.Exceptions != nil {
		return v.Exceptions
	}

	return
}
922596
func (client *Client) GetServices(filters ...Filter) ([]Service, Warnings, error) {
	opts := requestOptions{
		RequestName: internal.GetServicesRequest,
		Query:       ConvertFilterParameters(filters),
	}

	return client.makeServicesRequest(opts)
}
1374766
func (*CloudControllerConnection) handleWarnings(response *http.Response) ([]string, error) {
	rawWarnings := response.Header.Get("X-Cf-Warnings")
	if len(rawWarnings) == 0 {
		return nil, nil
	}

	var warnings []string
	for _, rawWarning := range strings.Split(rawWarnings, ",") {
		warning, err := url.QueryUnescape(rawWarning)
		if err != nil {
			return nil, err
		}
		warnings = append(warnings, strings.Trim(warning, " "))
	}

	return warnings, nil
}
416762
func (fcr *FileCustomRule) GetRules() (qrs *rules.Rules, version int64, err error) {
	return fcr.currentRuleSet.Copy(), fcr.currentRuleSetTimestamp, nil
}
253216
func (s *Notifications) SetWarning(v string) *Notifications {
	s.Warning = &v
	return s
}
578603
func (r *Result) MergeAsWarnings(others ...*Result) *Result {
	for _, other := range others {
		if other != nil {
			r.resetCaches()
			r.AddWarnings(other.Errors...)
			r.AddWarnings(other.Warnings...)
			r.MatchCount += other.MatchCount
		}
	}
	return r
}
536282
func (r *Response) AddWarning(warning string) {
	if r.Warnings == nil {
		r.Warnings = make([]string, 0, 1)
	}
	r.Warnings = append(r.Warnings, warning)
}
41135
func (s *CreateApiOutput) SetWarnings(v []*string) *CreateApiOutput {
	s.Warnings = v
	return s
}
684236
func algWarnings(cert *x509.Certificate) (warnings []string) {
	alg, size := decodeKey(cert.PublicKey)
	if (alg == "RSA" || alg == "DSA") && size < 2048 {
		warnings = append(warnings, fmt.Sprintf("Size of %s key should be at least 2048 bits", alg))
	}
	if alg == "ECDSA" && size < 224 {
		warnings = append(warnings, fmt.Sprintf("Size of %s key should be at least 224 bits", alg))
	}

	for _, alg := range badSignatureAlgorithms {
		if cert.SignatureAlgorithm == alg {
			warnings = append(warnings, fmt.Sprintf("Signed with %s, which is an outdated signature algorithm", algString(alg)))
		}
	}

	if alg == "RSA" {
		key := cert.PublicKey.(*rsa.PublicKey)
		if key.E < 3 {
			warnings = append(warnings, "Public key exponent in RSA key is less than 3")
		}
		if key.N.Sign() != 1 {
			warnings = append(warnings, "Public key modulus in RSA key appears to be zero/negative")
		}
	}

	return
}
1294720
func (session *SafeSession) ClearWarnings() {
	session.mu.Lock()
	defer session.mu.Unlock()
	session.Session.Warnings = nil
}
29458
func (s *PutPipelineDefinitionOutput) SetValidationWarnings(v []*ValidationWarning) *PutPipelineDefinitionOutput {
	s.ValidationWarnings = v
	return s
}