Skip to content

Commit

Permalink
g.setproj: Fix uninitialized variables (#3777)
Browse files Browse the repository at this point in the history
Fixes uninitialized variables reported by Cppcheck.
  • Loading branch information
ShubhamDesai authored Jun 6, 2024
1 parent 8797cd3 commit 0f533c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions general/g.setproj/get_stp.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int get_stp_num(void)
FILE *fipsfile;
char FIPSfile[256], buff[256];
int NUM_ZON, sfips, cfips, SFIPS = 0, CFIPS = 0;
int record, icode, reccnt, special_case;
int record, icode, reccnt = 0, special_case;
char STabbr[50], COname[50];

sprintf(FIPSfile, "%s/etc/proj/FIPS.code", G_gisbase());
Expand Down Expand Up @@ -139,7 +139,7 @@ int get_stp_num(void)
int ask_fips(FILE *fp, int *s, int *c, int *sc)
{
int ii, FIPS = 0, NUM_ZON, sfips, cfips;
char STabbr[50], STabbr_prev[50], COname[50], answer[50], buff[256];
char STabbr[50], STabbr_prev[50] = "", COname[50], answer[50], buff[256];
char *Tmp_file1, *Tmp_file2, *a, *b;
FILE *Tmp_fd1 = NULL, *Tmp_fd2 = NULL;
int in_stat;
Expand Down

0 comments on commit 0f533c2

Please sign in to comment.