Skip to content

Commit

Permalink
tools/defines/create_platform_cfg.sh: fixed SC2236 Shellcheck warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Oct 11, 2023
1 parent d5285b3 commit cc005f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/defines/create_platform_cfg.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

if [ ! -z "$1" ]; then
if [ -n "$1" ]; then
compiler_cmd=$1
else
compiler_cmd="gcc"
Expand All @@ -11,7 +11,7 @@ compiler_defs=$($compiler_cmd -dM -E - < /dev/null)
char_bit=$(echo "$compiler_defs" | grep __CHAR_BIT__ | cut -d' ' -f3)
# only set by compiler if -funsigned-char is specified
char_unsigned=$(echo "$compiler_defs" | grep __CHAR_UNSIGNED__ | cut -d' ' -f3)
if [ ! -z "$char_unsigned" ] && [ "$char_unsigned" -eq 1 ]; then
if [ -n "$char_unsigned" ] && [ "$char_unsigned" -eq 1 ]; then
default_sign="unsigned"
else
default_sign="signed"
Expand Down

0 comments on commit cc005f6

Please sign in to comment.