Skip to content

Commit f5a7d7a

Browse files
committed
CPP: Correct a few comments.
1 parent d22c93f commit f5a7d7a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cpp/ql/src/semmle/code/cpp/commons/Printf.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,8 @@ class FormatLiteral extends Literal {
672672
/**
673673
* Gets the char type required by the nth conversion specifier.
674674
* - in the base case this is the default for the formatting function
675-
* (e.g. `char` for `printf`, `wchar_t` for `wprintf`).
676-
* - the `%C` format character reverses wideness on some platforms.
675+
* (e.g. `char` for `printf`, `char` or `wchar_t` for `wprintf`).
676+
* - the `%C` format character reverses wideness.
677677
* - the size prefixes 'l'/'w' and 'h' override the type character
678678
* to wide or single-byte characters respectively.
679679
*/
@@ -719,7 +719,7 @@ class FormatLiteral extends Literal {
719719
/**
720720
* Gets the string type required by the nth conversion specifier.
721721
* - in the base case this is the default for the formatting function
722-
* (e.g. `char` for `printf`, `wchar_t` for `wprintf`).
722+
* (e.g. `char *` for `printf`, `char *` or `wchar_t *` for `wprintf`).
723723
* - the `%S` format character reverses wideness on some platforms.
724724
* - the size prefixes 'l'/'w' and 'h' override the type character
725725
* to wide or single-byte characters respectively.

cpp/ql/src/semmle/code/cpp/models/interfaces/FormattingFunction.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ abstract class FormattingFunction extends Function {
6666
* Gets the character type used in the format string for this function.
6767
*/
6868
Type getFormatCharType() {
69-
result =
69+
result =
7070
stripTopLevelSpecifiersOnly(
7171
stripTopLevelSpecifiersOnly(
7272
getParameter(getFormatParameterIndex()).getType().getUnderlyingType()

0 commit comments

Comments
 (0)