mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 08:50:07 +01:00
checkpatch: warn about using glib typedefs like gchar or gint
We should not use glib typedefs for basic C types char, short, int, long, float or double. We commonly do not use them, so enforce consistency. That is not true for typedefs like guint, which we commonly use because it's shorter typing than "unsigned int" (or "int unsigned" or "unsigned"). Whether or not to use guint is left undecided at this point.
This commit is contained in:
parent
b41aa4bfde
commit
e82e2ca730
1 changed files with 1 additions and 0 deletions
|
|
@ -119,6 +119,7 @@ next unless $filename =~ /\.[ch]$/;
|
|||
|
||||
complain ('Tab following a space') if $line =~ / \t/;
|
||||
complain ('Trailing whitespace') if $line =~ /[ \t]$/;
|
||||
complain ('Don\'t use glib typedefs for char/short/int/long/float/double') if $line =~ /\bg(char|short|int|long|float|double)\b/;
|
||||
|
||||
# Further on we process stuff without comments.
|
||||
$_ = $line;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue