RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 04-Sep-2013 20:33:50 Branch: rpm-5_4 Handle: 2013090418335000 Modified files: (Branch: rpm-5_4) rpm/rpmio tgit.c Log: - git: fix up simple compilation warnings. Summary: Revision Changes Path 1.1.2.31 +24 -7 rpm/rpmio/tgit.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/rpmio/tgit.c ============================================================================ $ cvs diff -u -r1.1.2.30 -r1.1.2.31 tgit.c --- rpm/rpmio/tgit.c 6 Jul 2013 20:45:52 -0000 1.1.2.30 +++ rpm/rpmio/tgit.c 4 Sep 2013 18:33:50 -0000 1.1.2.31 @@ -99,6 +99,7 @@ FILE * fp = stdout; char username[128] = {0}; char password[128] = {0}; + int xx; (void)url; (void)username_from_url; @@ -106,11 +107,11 @@ (void)payload; fprintf(fp, "Username: "); - scanf("%s", username); + xx = scanf("%s", username); /* Yup. Right there on your terminal. Careful where you copy/paste output. */ fprintf(fp, "Password: "); - scanf("%s", password); + xx = scanf("%s", password); return git_cred_userpass_plaintext_new(out, username, password); } @@ -1806,6 +1807,9 @@ POPT_AUTOHELP POPT_TABLEEND }; + +git_threads_init(); + rpmgit git = rpmgitNew(argv, 0, cfOpts); FILE * fp = stdout; rpmRC rc = RPMRC_FAIL; @@ -1813,7 +1817,6 @@ int xx = -1; int i; -git_threads_init(); if (CF_ISSET(BATCH) || CF_ISSET(CHECK)) { ARGV_t nav = NULL; xx = argvFgets(&nav, NULL); @@ -1886,8 +1889,13 @@ assert(0); case GIT_OBJ_BLOB: - fwrite(git_blob_rawcontent(obj), git_blob_rawsize(obj), 1, fp); - break; + { + const git_blob * blob = (const git_blob *) obj; + const void * b = git_blob_rawcontent(blob); + size_t nb = git_blob_rawsize(blob); + size_t nw = fwrite(b, 1, nb, fp); +assert(nb == nw); + } break; case GIT_OBJ_TREE: rpmgitPrintTree(obj, fp); break; @@ -1908,12 +1916,16 @@ git_object_free(obj); } +#ifdef UNUSED exit: +#endif rc = (missing ? RPMRC_NOTFOUND : RPMRC_OK); SPEW(0, rc, git); -git_threads_shutdown(); git = rpmgitFree(git); + +git_threads_shutdown(); + return rc; } #undef CF_ISSET @@ -2124,7 +2136,9 @@ git_odb_free(odb); #endif +#ifdef NOTYET exit: +#endif rc = (xx ? RPMRC_NOTFOUND : RPMRC_OK); SPEW(0, rc, git); @@ -2501,7 +2515,7 @@ NUL-terminated machine-readable format. Without this option, each pathname output will have TAB, LF, double - quotes, and backslash characters replaced with \t, \n, \", and \\, + quotes, and backslash characters replaced with \t, \n, (escaped double quote), and \\, respectively, and the pathname will be enclosed in double quotes if any of those replacements occurred. @@ -2710,7 +2724,9 @@ rpmgit git = rpmgitNew(argv, 0, applyOpts); int xx = -1; +#ifdef NOTYET exit: +#endif rc = (xx ? RPMRC_FAIL : RPMRC_OK); SPEW(0, rc, git); apply_fake_ancestor = _free(apply_fake_ancestor); @@ -3406,6 +3422,7 @@ POPT_TABLEEND }; +static rpmRC cmd_help(int argc, /*@unused@*/ char *argv[]) __attribute__((unused)); static rpmRC cmd_help(int argc, /*@unused@*/ char *argv[]) { FILE * fp = stdout; @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org