summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs-1.c
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-12-01 12:38:43 +0900
committerMichele Calgaro <[email protected]>2023-12-01 12:38:43 +0900
commitb67b7f2b784c7105e88a5e639d9d84736ae2cbc1 (patch)
tree0fd16d439c681c07d57d7f0d544c7582e04c3a31 /debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs-1.c
parentc0a6f1b84c84749908961579b84513fd9f9d9eac (diff)
downloadextra-dependencies-b67b7f2b784c7105e88a5e639d9d84736ae2cbc1.tar.gz
extra-dependencies-b67b7f2b784c7105e88a5e639d9d84736ae2cbc1.zip
uncrustify-trinity: updated based on upstream version 0.78.1
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs-1.c')
-rw-r--r--debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs-1.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs-1.c b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs-1.c
new file mode 100644
index 00000000..39050c07
--- /dev/null
+++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/bugs-1.c
@@ -0,0 +1,52 @@
+int oldfoo(bar)
+ char bar;
+{
+ return bar -2;
+}
+
+int i2c_use_client(struct i2c_client *client)
+{
+ int ret;
+
+ ret = i2c_inc_use_client(client);
+ if (ret)
+ return ret;
+
+ if ((client->flags & I2C_CLIENT_ALLOW_USE) || (a &&
+ something_else))
+ {
+ if (client->flags & I2C_CLIENT_ALLOW_MULTIPLE_USE)
+ client->usage_count++;
+ else if (client->usage_count > 0)
+ goto busy;
+ else
+ client->usage_count++;
+ }
+
+ return 0;
+ busy:
+ i2c_dec_use_client(client);
+ return -EBUSY;
+}
+
+void get_name(void)
+{
+ a = (int)5;
+
+ if (a)
+ if (b)
+ b--;
+ else
+ {
+ a++;
+ }
+ for (a=0; a < 10; a++)
+ if (b)
+ {
+ b--;
+ }
+ else
+ a++;
+ return;
+}
+